Add dummy compiler argument.

This commit is contained in:
Chao Shen 2018-02-23 18:43:15 +08:00 committed by Jacob Dufault
parent 3e3bf885eb
commit e03a3a8e7c

View File

@ -348,6 +348,8 @@ std::vector<Project::Entry> LoadFromDirectoryListing(Config* init_opts,
e.directory = config->project_dir; e.directory = config->project_dir;
e.file = file; e.file = file;
e.args = GetCompilerArgumentForFile(file); e.args = GetCompilerArgumentForFile(file);
if (e.args.empty())
e.args.push_back("%clang"); // Add a Dummy.
e.args.push_back(e.file); e.args.push_back(e.file);
result.push_back( result.push_back(
GetCompilationEntryFromCompileCommandEntry(init_opts, config, e)); GetCompilationEntryFromCompileCommandEntry(init_opts, config, e));