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:
Allan Shortlidge
2023-05-16 14:42:26 -07:00
parent 0594efc0ce
commit 0e7ad1e9a4
7 changed files with 175 additions and 43 deletions

View File

@@ -122,6 +122,10 @@ llvm::Regex swift::getSwiftInterfaceCompilerVersionRegex() {
": (.+)$", llvm::Regex::Newline);
}
llvm::Regex swift::getSwiftInterfaceCompilerToolsVersionRegex() {
return llvm::Regex("Swift version ([0-9\\.]+)", llvm::Regex::Newline);
}
// MARK(https://github.com/apple/swift/issues/43510): Module name shadowing warnings
//
// When swiftc emits a module interface, it qualifies most types with their