mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
DependencyScanner: add a new extraPcmArgs field for each Swift module
Building each Swift module explicitly requires dependency PCMs to be built with the exactly same deployment target version. This means we may need to build a Clang module multiple times with different target triples. This patch removes the -target arguments from the reported PCM build arguments and inserts extraPcmArgs fields to each Swift module. swift-driver can combine the generic PCM arguments with these extra arguments to get the command suitable for building a PCM specifically for that loading Swift module.
This commit is contained in:
@@ -89,6 +89,7 @@ struct SubCompilerInstanceInfo {
|
||||
CompilerInstance* Instance;
|
||||
StringRef Hash;
|
||||
ArrayRef<StringRef> BuildArguments;
|
||||
ArrayRef<StringRef> ExtraPCMArgs;
|
||||
};
|
||||
|
||||
/// Abstract interface to run an action in a sub ASTContext.
|
||||
@@ -97,7 +98,8 @@ struct InterfaceSubContextDelegate {
|
||||
StringRef interfacePath,
|
||||
StringRef outputPath,
|
||||
SourceLoc diagLoc,
|
||||
llvm::function_ref<bool(ASTContext&,ArrayRef<StringRef>, StringRef)> action) = 0;
|
||||
llvm::function_ref<bool(ASTContext&,ArrayRef<StringRef>,
|
||||
ArrayRef<StringRef>, StringRef)> action) = 0;
|
||||
virtual bool runInSubCompilerInstance(StringRef moduleName,
|
||||
StringRef interfacePath,
|
||||
StringRef outputPath,
|
||||
|
||||
Reference in New Issue
Block a user