mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ExplicitModule] Include -Xcc -D into module hash
The decision to exclude `-Xcc -D` options from swift module hash actually doesn't help to solve the problem. It wouldn't reduce the module variants (or the number of swiftmodule build commands) because the command-line also encodes all the clang PCM dependencies that do get affected by `-Xcc` flags. To avoid the false sharing and the nondeterministic build products, include most of the `-Xcc` flags, except include search path, into swift module hash. rdar://132046247
This commit is contained in:
@@ -383,8 +383,7 @@ ModuleDependencyScanner::getMainModuleDependencyInfo(ModuleDecl *mainModule) {
|
||||
std::vector<std::string> buildArgs;
|
||||
if (ScanASTContext.ClangImporterOpts.ClangImporterDirectCC1Scan) {
|
||||
buildArgs.push_back("-direct-clang-cc1-module-build");
|
||||
for (auto &arg : clangImporter->getSwiftExplicitModuleDirectCC1Args(
|
||||
/*isInterface=*/false)) {
|
||||
for (auto &arg : clangImporter->getSwiftExplicitModuleDirectCC1Args()) {
|
||||
buildArgs.push_back("-Xcc");
|
||||
buildArgs.push_back(arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user