Skip to content

Commit

Permalink
Restore call to GetPlatformClangArguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdufault authored and MaskRay committed Oct 24, 2019
1 parent fb304d5 commit 997bcdf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/project.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <unordered_set>
#include <vector>

extern bool gTestOutputMode;

struct CompileCommandsEntry {
std::string directory;
std::string file;
Expand Down Expand Up @@ -208,6 +210,12 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
if (!AnyStartsWith(args, "-working-directory"))
result.args.emplace_back("-working-directory=" + entry.directory);

if (!gTestOutputMode) {
std::vector<const char*> 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;
Expand Down Expand Up @@ -622,6 +630,7 @@ TEST_SUITE("Project") {
std::vector<std::string> raw,
std::vector<std::string> expected) {
g_disable_normalize_path_for_test = true;
gTestOutputMode = true;

Config config;
ProjectConfig project;
Expand Down

0 comments on commit 997bcdf

Please sign in to comment.