mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Soft-reject swiftmodules built against a different SDK
Change the way swiftmodules built against a different SDK than their clients are rejected. This makes them silently ignored when the module can be rebuilt from their swiftinterface, instead of reporting a hard error. rdar://93257769
This commit is contained in:
@@ -373,7 +373,7 @@ private:
|
||||
std::unique_ptr<llvm::MemoryBuffer> moduleInputBuffer,
|
||||
std::unique_ptr<llvm::MemoryBuffer> moduleDocInputBuffer,
|
||||
std::unique_ptr<llvm::MemoryBuffer> moduleSourceInfoInputBuffer,
|
||||
bool isFramework, bool requiresOSSAModules,
|
||||
bool isFramework, bool requiresOSSAModules, StringRef requiredSDK,
|
||||
serialization::ValidationInfo &info, PathObfuscator &pathRecoverer);
|
||||
|
||||
/// Change the status of the current module.
|
||||
@@ -510,13 +510,13 @@ public:
|
||||
std::unique_ptr<llvm::MemoryBuffer> moduleDocInputBuffer,
|
||||
std::unique_ptr<llvm::MemoryBuffer> moduleSourceInfoInputBuffer,
|
||||
bool isFramework, bool requiresOSSAModules,
|
||||
PathObfuscator &pathRecoverer,
|
||||
StringRef requiredSDK, PathObfuscator &pathRecoverer,
|
||||
std::shared_ptr<const ModuleFileSharedCore> &theModule) {
|
||||
serialization::ValidationInfo info;
|
||||
auto *core = new ModuleFileSharedCore(
|
||||
std::move(moduleInputBuffer), std::move(moduleDocInputBuffer),
|
||||
std::move(moduleSourceInfoInputBuffer), isFramework,
|
||||
requiresOSSAModules, info, pathRecoverer);
|
||||
requiresOSSAModules, requiredSDK, info, pathRecoverer);
|
||||
if (!moduleInterfacePath.empty()) {
|
||||
ArrayRef<char> path;
|
||||
core->allocateBuffer(path, moduleInterfacePath);
|
||||
|
||||
Reference in New Issue
Block a user