From 40d82f042b3dd2889079cbdc45d319bfbd5c8819 Mon Sep 17 00:00:00 2001 From: jashook Date: Thu, 14 Nov 2019 15:36:09 -0800 Subject: [PATCH 1/2] Use /artifacts in place of /bin --- src/jit-format/jit-format.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jit-format/jit-format.cs b/src/jit-format/jit-format.cs index 4254a260..aefe389f 100644 --- a/src/jit-format/jit-format.cs +++ b/src/jit-format/jit-format.cs @@ -212,7 +212,7 @@ private void validate() // If the user didn't specify a compile_commands.json, we need to see if one exists, and if not, create it. if (!_untidy && _compileCommands == null) { - string[] compileCommandsPath = { _rootPath, "bin", "nmakeobj", "Windows_NT." + _arch + "." + _build, "compile_commands.json" }; + string[] compileCommandsPath = { _rootPath, "artifacts", "nmakeobj", "Windows_NT." + _arch + "." + _build, "compile_commands.json" }; _compileCommands = Path.Combine(compileCommandsPath); _rewriteCompileCommands = true; @@ -243,7 +243,7 @@ private void validate() // If the user didn't specify a compile_commands.json, we need to see if one exists, and if not, create it. if (!_untidy && _compileCommands == null) { - string[] compileCommandsPath = { _rootPath, "bin", "obj", _os + "." + _arch + "." + _build, "compile_commands.json" }; + string[] compileCommandsPath = { _rootPath, "artifacts", "obj", _os + "." + _arch + "." + _build, "compile_commands.json" }; _compileCommands = Path.Combine(compileCommandsPath); _rewriteCompileCommands = true; @@ -429,7 +429,7 @@ public static int Main(string[] args) if (config.DoClangTidy) { - string[] newCompileCommandsDirPath = { config.CoreCLRRoot, "bin", "obj", config.OS + "." + config.Arch + "." + config.Build }; + string[] newCompileCommandsDirPath = { config.CoreCLRRoot, "artifacts", "obj", config.OS + "." + config.Arch + "." + config.Build }; string compileCommands = config.CompileCommands; string newCompileCommandsDir = Path.Combine(newCompileCommandsDirPath); string newCompileCommands = Path.Combine(newCompileCommandsDir, "compile_commands_full.json"); From e769ee79151a401a45109a2b26db9e3893be3361 Mon Sep 17 00:00:00 2001 From: jashook Date: Sat, 16 Nov 2019 20:52:23 -0800 Subject: [PATCH 2/2] Change to reflect root dir usage --- src/jit-format/jit-format.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jit-format/jit-format.cs b/src/jit-format/jit-format.cs index aefe389f..b712e3a9 100644 --- a/src/jit-format/jit-format.cs +++ b/src/jit-format/jit-format.cs @@ -37,6 +37,7 @@ public class Config private string _os = null; private string _build = null; private string _rootPath = null; + private string _repoRootPath = null; private IReadOnlyList _filenames = Array.Empty(); private IReadOnlyList _projects = Array.Empty(); private string _srcDirectory = null; @@ -212,7 +213,7 @@ private void validate() // If the user didn't specify a compile_commands.json, we need to see if one exists, and if not, create it. if (!_untidy && _compileCommands == null) { - string[] compileCommandsPath = { _rootPath, "artifacts", "nmakeobj", "Windows_NT." + _arch + "." + _build, "compile_commands.json" }; + string[] compileCommandsPath = { _rootPath, "..", "..", "artifacts", "nmakeobj", "Windows_NT." + _arch + "." + _build, "compile_commands.json" }; _compileCommands = Path.Combine(compileCommandsPath); _rewriteCompileCommands = true; @@ -243,7 +244,7 @@ private void validate() // If the user didn't specify a compile_commands.json, we need to see if one exists, and if not, create it. if (!_untidy && _compileCommands == null) { - string[] compileCommandsPath = { _rootPath, "artifacts", "obj", _os + "." + _arch + "." + _build, "compile_commands.json" }; + string[] compileCommandsPath = { _rootPath, "..", "..", "artifacts", "obj", "coreclr", _os + "." + _arch + "." + _build, "compile_commands.json" }; _compileCommands = Path.Combine(compileCommandsPath); _rewriteCompileCommands = true; @@ -429,7 +430,7 @@ public static int Main(string[] args) if (config.DoClangTidy) { - string[] newCompileCommandsDirPath = { config.CoreCLRRoot, "artifacts", "obj", config.OS + "." + config.Arch + "." + config.Build }; + string[] newCompileCommandsDirPath = { config.CoreCLRRoot, "..", "..", "artifacts", "obj", "coreclr", config.OS + "." + config.Arch + "." + config.Build }; string compileCommands = config.CompileCommands; string newCompileCommandsDir = Path.Combine(newCompileCommandsDirPath); string newCompileCommands = Path.Combine(newCompileCommandsDir, "compile_commands_full.json");