Commit Graph

7 Commits

Author SHA1 Message Date
Mike Ash
e727252733 [Concurrency] Fix start of version ranges in install name magic symbols.
The magic symbols specify a version range where clients should reference a @rpath relative path to libswift_Concurrency.dylib instead of the standard absolute path. This version range started at macOS 10.15 and aligned versions, which is the oldest target supported by Concurrency. However, clients that use Concurrency can target earlier OSes as long as they availability-check their use of Concurrency. When targeting something earlier than 10.15, they'd reference the absolute path, then fail to find the back-deployment Concurrency runtime on OS versions that need it.

Fix this by setting the start of the range to macOS 10.9 and aligned, which is the oldest target supported by Swift.

rdar://140476764
2024-12-09 15:57:46 -05:00
Ian Anderson
9e9d66efc9 [overlay] Support the older @rpath Darwin library for _Builtin_float's $ld$previous$ symbols
The _Builtin_float symbols were moved twice, most recently from the OS Darwin library, but previously they were in the embedded @rpath Darwin library. @_originallyDefinedIn doesn't support multiple install names, but it can be replaced with -module-abi-name, and then multiple $ld$previous$ symbols can be used.
Update the Platform and Concurrency magic symbols to use $ld$previous$ everywhere.

rdar://130107191
2024-07-09 09:13:30 -07:00
Egor Zhdan
84a1ffcb33 [Shims] Include SwiftShims headers without ../
This replaces a number of `#include`-s like this:
```
#include "../../../stdlib/public/SwiftShims/Visibility.h"
```
with this:
```
#include "swift/shims/Visibility.h"
```

This is needed to allow SwiftCompilerSources to use C++ headers which include SwiftShims headers. Currently trying to do that results in errors:
```
swift/swift/include/swift/Demangling/../../../stdlib/public/SwiftShims/module.modulemap:1:8: error: redefinition of module 'SwiftShims'
module SwiftShims {
       ^
Builds.noindex/swift/swift/bootstrapping0/lib/swift/shims/module.modulemap:1:8: note: previously defined here
module SwiftShims {
       ^
```
This happens because the headers in both the source dir and the build dir refer to SwiftShims headers by relative path, and both the source root and the build root contain SwiftShims headers (which are equivalent, but since they are located in different dirs, Clang treats them as different modules).
2022-09-14 11:14:50 +01:00
Kuba (Brecka) Mracek
c2581aef76 Use the SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT macro guard in magic-symbols-for-install-name.c (#41280) 2022-02-09 09:40:08 -08:00
Doug Gregor
307380ef9d Use the proper install name for back-deployed concurrency on macCatalyst.
Fixes rdar://84393581.
2021-10-18 16:46:33 -07:00
Doug Gregor
3c21857d7f Extend and test install_name symbols for back-deployed concurrency.
With these magic symbols, programs that link against the _Concurrency
module with a deployment target prior to iOS 15 / macOS 12 / watchOS 8
will reference `libswift_Concurrency.dylib` via rpath.

Fixes rdar://81187835.
2021-09-22 13:39:09 -07:00
Varun Gandhi
5743040cc0 Add magic symbols for concurrency. 2021-09-22 12:37:18 -07:00