use correct build step list for clang pch

This commit is contained in:
jacob 2024-06-11 12:34:30 -05:00
parent 59c2d06ffa
commit e977d95504

15
build.c
View File

@ -288,7 +288,7 @@ void BuildStepMsvcCompileCommand(Step *s)
SH_CommandResult result = SH_RunCommandCaptureOutput(scratch.arena, arg->cmd, true);
if (!result.error && !D_IsNil(arg->depfile_dependent) && !D_IsNil(arg->output_depfile)) {
String depfile_data = B_DepfileTextFromMsvcOutput(scratch.arena, arg->depfile_dependent, arg->depfile_force_includes, result.output);
String depfile_data = D_DepfileTextFromMsvcOutput(scratch.arena, arg->depfile_dependent, arg->depfile_force_includes, result.output);
D_ClearWrite(arg->output_depfile, depfile_data);
}
@ -413,11 +413,11 @@ void OnBuild(StringList cli_args)
where_res = SH_RunCommandCaptureOutput(&arena, Lit("where clang.exe"), true);
}
compiler_loc = where_res.error ? Lit("Not found") : StringReplace(&arena, where_res.output, Lit("\n"), Lit(""));
SH_PrintF(Lit("Compiler: %F (%F)\n"), FmtStr(compiler), FmtStr(compiler_loc));
SH_PrintF(Lit("[Compiler: %F] (%F)\n"), FmtStr(compiler), FmtStr(compiler_loc));
}
if (arg_asan) SH_Print(Lit("Asan Enabled\n"));
if (arg_profiling) SH_Print(Lit("Profiling\n"));
if (arg_developer) SH_Print(Lit("Developer build enabled\n"));
if (arg_asan) SH_Print(Lit("[Asan Enabled]\n"));
if (arg_profiling) SH_Print(Lit("[Profiling]\n"));
if (arg_developer) SH_Print(Lit("[Developer build]\n"));
SH_PrintF(Lit("Building to \"%F\"\n"), FmtStr(out_bin_dir_path));
SH_Print(Lit("------------------------------\n\n"));
@ -647,7 +647,6 @@ void OnBuild(StringList cli_args)
}
}
/* ========================== *
* Build
* ========================== */
@ -811,7 +810,7 @@ void OnBuild(StringList cli_args)
bs_arg->cmd = StringF(&arena, pch_c_compile_args_fmt, FmtStr(pch_header_file.full_path), FmtStr(pch_c_file.full_path));
bs_arg->depfile_dependent = pch_header_file;
bs_arg->output_depfile = dep_file;
AddStep(&comp_build_steps, step_name, &BuildStepMsvcCompileCommand, bs_arg);
AddStep(&rc_and_pch_build_steps, step_name, &BuildStepMsvcCompileCommand, bs_arg);
}
/* Cpp */
@ -821,7 +820,7 @@ void OnBuild(StringList cli_args)
bs_arg->cmd = StringF(&arena, pch_cpp_compile_args_fmt, FmtStr(pch_header_file.full_path), FmtStr(pch_cpp_file.full_path));
bs_arg->depfile_dependent = pch_header_file;
bs_arg->output_depfile = dep_file;
AddStep(&comp_build_steps, step_name, &BuildStepMsvcCompileCommand, bs_arg);
AddStep(&rc_and_pch_build_steps, step_name, &BuildStepMsvcCompileCommand, bs_arg);
}
}
}