mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ModuleInterface: pass-down paths obfuscator to module interface building commands
While implicitly building .swiftinterface, the interface may import other binary modules. These binary modules may contain serialized search paths that have been obfuscated. To help interface building commands recover these search paths, we need to pass down the obfuscators to the module building commands. rdar://87840268
This commit is contained in:
@@ -1341,6 +1341,15 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
|
||||
genericSubInvocation.getLangOptions().DisableAvailabilityChecking = true;
|
||||
GenericArgs.push_back("-disable-availability-checking");
|
||||
}
|
||||
|
||||
// Pass-down the obfuscators so we can get the serialized search paths properly.
|
||||
genericSubInvocation.setSerializedPathObfuscator(
|
||||
SearchPathOpts.DeserializedPathRecoverer);
|
||||
SearchPathOpts.DeserializedPathRecoverer
|
||||
.forEachPair([&](StringRef lhs, StringRef rhs) {
|
||||
GenericArgs.push_back(ArgSaver.save(llvm::Twine("-serialized-path-obfuscate ")
|
||||
+ lhs + "=" + rhs).str());
|
||||
});
|
||||
}
|
||||
|
||||
bool InterfaceSubContextDelegateImpl::extractSwiftInterfaceVersionAndArgs(
|
||||
|
||||
Reference in New Issue
Block a user