Skip to content

Commit

Permalink
Add the platform when using CDBs
Browse files Browse the repository at this point in the history
Summary: Forgot this in D63253312 and the test plan wasn't good enough :(

Reviewed By: donsbot

Differential Revision: D63459012

fbshipit-source-id: f109bf5e602bb09978ae717485eb5fa9c9e24109
  • Loading branch information
Simon Marlow authored and facebook-github-bot committed Sep 26, 2024
1 parent 3c31546 commit 2f60958
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion glean/lang/clang/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,14 @@ struct Config {
fail("missing --cdb-dir");
}
auto cdb = loadCompilationDatabase(FLAGS_cdb_dir);
folly::Optional<std::string> platform;
if (!FLAGS_platform.empty()) {
platform = FLAGS_platform;
}
for(const auto& file : cdb->getAllFiles()){
sources.push_back(SourceFile{
FLAGS_cdb_target.c_str(),
folly::Optional<std::string>(),
platform,
FLAGS_cdb_dir.c_str(),
file,
});
Expand Down

0 comments on commit 2f60958

Please sign in to comment.