diff --git a/src/jit-format/jit-format.cs b/src/jit-format/jit-format.cs index 4254a260..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, "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 +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, "bin", "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, "bin", "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");