mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: Don't append -target-min-inlining-target target to implicit module builds.
When performing an implicit module build, the frontend was prepending `-target-min-inlining-target target` to the command line. This was overriding the implicit `-target-min-inlining-target min` argument that is implied when `-library-level api` is specified. As a result, the wrong overload could be picked when compiling the body of an inlinable function to SIL for emission into the client, potentially resulting in crashes when the client of the module is back deployed to an older OS. Resolves rdar://109336472
This commit is contained in:
@@ -532,6 +532,18 @@ public:
|
||||
DependencyTracker *tracker = nullptr);
|
||||
};
|
||||
|
||||
struct SwiftInterfaceInfo {
|
||||
/// The compiler arguments that were encoded in the swiftinterface.
|
||||
SmallVector<const char *, 64> Arguments;
|
||||
|
||||
/// The string following `swift-compiler-version:` in the swiftinterface.
|
||||
std::string CompilerVersion;
|
||||
|
||||
/// The tools version of the compiler (e.g. 5.8) that emitted the
|
||||
/// swiftinterface. This is extracted from the `CompilerVersion` string.
|
||||
llvm::Optional<version::Version> CompilerToolsVersion;
|
||||
};
|
||||
|
||||
struct InterfaceSubContextDelegateImpl: InterfaceSubContextDelegate {
|
||||
private:
|
||||
SourceManager &SM;
|
||||
@@ -558,8 +570,7 @@ private:
|
||||
bool suppressRemarks,
|
||||
RequireOSSAModules_t requireOSSAModules);
|
||||
bool extractSwiftInterfaceVersionAndArgs(CompilerInvocation &subInvocation,
|
||||
SmallVectorImpl<const char *> &SubArgs,
|
||||
std::string &CompilerVersion,
|
||||
SwiftInterfaceInfo &interfaceInfo,
|
||||
StringRef interfacePath,
|
||||
SourceLoc diagnosticLoc);
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user