diff --git a/src/project.cc b/src/project.cc index 6411d1ae..541df686 100644 --- a/src/project.cc +++ b/src/project.cc @@ -27,6 +27,8 @@ #include #include +extern bool gTestOutputMode; + struct CompileCommandsEntry { std::string directory; std::string file; @@ -208,6 +210,12 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry( if (!AnyStartsWith(args, "-working-directory")) result.args.emplace_back("-working-directory=" + entry.directory); + if (!gTestOutputMode) { + std::vector platform = GetPlatformClangArguments(); + for (auto arg : platform) + result.args.push_back(arg); + } + bool next_flag_is_path = false; bool add_next_flag_to_quote_dirs = false; bool add_next_flag_to_angle_dirs = false; @@ -622,6 +630,7 @@ TEST_SUITE("Project") { std::vector raw, std::vector expected) { g_disable_normalize_path_for_test = true; + gTestOutputMode = true; Config config; ProjectConfig project;