Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/jit-format/jit-format.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> _filenames = Array.Empty<string>();
private IReadOnlyList<string> _projects = Array.Empty<string>();
private string _srcDirectory = null;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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");
Expand Down