Commit Graph

30 Commits

Author SHA1 Message Date
Allan Shortlidge
cb578172ea Tests: Remove -disable-availability-checking in more tests that use concurrency.
Use the `%target-swift-5.1-abi-triple` substitution to compile the tests for
deployment to the minimum OS versions required for use of _Concurrency APIs,
instead of disabling availability checking.
2024-10-19 12:35:20 -07:00
Egor Zhdan
b1c3ddb322 [build] Do not implicitly bump macCatalyst deployment target
This fixes linker warnings that look like this:
```
ld: warning: object file (libswiftCompatibility56.a) was built for newer 'macOS' version (XYZ) than being linked (ABC)
```

These were caused by the compatibility binary being incorrectly built with a newer `-target` than desired: the CMake logic was overriding the requested minimum macOS deployment version (10.9) with a much newer macOS SDK version.

rdar://137565964
2024-10-15 15:53:41 +01:00
Ian Anderson
0fdd98b8a0 Swift CI: test: Concurrency/Backdeploy/linking_maccatalyst.swift is failing on macCatalyst
When I did https://github.com/swiftlang/swift/pull/74920 I forgot to update test/Concurrency/Backdeploy/linking_maccatalyst.swift the same way linking.swift got updated.

rdar://132710925
2024-09-10 21:27:22 -07: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
Arnold Schwaighofer
8204f08965 Fix test/Concurrency/Backdeploy directory 2023-06-20 12:48:35 -07:00
Arnold Schwaighofer
c1a93e0bde Move tests over to use the %use_no_opaque_pointers option 2023-06-14 10:49:48 -07:00
Mike Ash
80bb78d01d [Test] Change the -target line on some tests to use a minimum of macOS 10.13.
These tests were targeting 10.9 or 10.10, but the minimum deployment target now supported by Xcode is 10.13. Bump them up to match:

test/Concurrency/Backdeploy/linking.swift
test/Concurrency/Backdeploy/linking_maccatalyst.swift
test/Runtime/stable-bit-backward-deployment.swift
2023-02-21 13:48:33 -05:00
Kuba (Brecka) Mracek
7853184ed6 Enable running tests from test/Concurrency/ directory in freestanding/minimal presets (#61835)
* Enable running tests from test/Concurrency/ directory in freestanding/minimal presets

* Mark failing Concurrency tests as XFAIL/SKIP on freestanding/minimal
2022-11-04 09:07:27 -07:00
Evan Wilde
f7810ada24 Revert "Merge pull request #60459 from etcwilde/ewilde/revert-backdeploy56"
This reverts commit 93387f8a0b, reversing
changes made to 88304c327f.
2022-09-01 10:07:44 -07:00
Evan Wilde
15b3659484 Revert "Merge pull request #60368 from etcwilde/ewilde/backdeploy56"
This reverts commit a3941bf215, reversing
changes made to b39302a585.
2022-08-09 07:16:02 -07:00
Evan Wilde
f496151309 Update backdeploy test to handle 5.6 compat lib
This patch updates the concurrency backdeployment test to handle the
inclusion of the Swift 5.6 compatibility library.

macOS12 will have the 5.6 library applied to it, so the
_swift_FORCE_LOAD_$_swiftCompatibility56 symbol is defined weakly.
2022-08-04 16:00:57 -07:00
Alejandro Alonso
2a2f70f944 Fix tests who aren't using %target-cpu (#59433)
don't import string processing
2022-06-14 20:39:03 -07:00
Doug Gregor
104271ce9e Minor concurrency test requirement cleanups 2022-06-13 12:04:16 -07:00
Doug Gregor
b43e864b3f Generalize tests for Apple Silicon 2022-06-06 14:37:17 -07:00
Evan Wilde
3e2c5a6af5 Make it LinkOnceODRLinkage
Make the little variable LinkOnceODRLinkage so that it doesn't take up
as much space.
2021-11-04 09:03:27 -07:00
Evan Wilde
1e7ce90361 Fixing the strong imported async frame pointer flags
The weakly-imported symbol was getting optimized out, then put back in
as a strongly-imported symbol. This is no good. The symbol is a
declaration though, so it can't be "used" directly. Instead, we assign
it to another global and "use" it. That avoids the optimizations and
should be fine. Even if that symbol is a nullptr because it doesn't
exist, we are taking the pointer to it, which should be fine for all
situations.
2021-11-04 09:02:17 -07:00
Doug Gregor
d5175abeba Always weak-link symbols from the concurrency library when back-deploying
This allows applications that back-deploy but only use concurrency in
newer code to load and execute properly, even when the concurrency library
is not available. Fixes rdar://84877644.
2021-11-01 16:51:04 -07:00
Artem Chikin
f7c37232b7 Update test/Concurrency/Backdeploy/linking.swift to require macCatalyst supported environment
Resolves rdar://84441879
2021-10-21 12:22:25 -07:00
Doug Gregor
4018bdfd86 Disable linking of the concurrency compatibility library for macCatalyst
It might not be there, and we don't need it for this test.
2021-10-18 20:39:40 -07: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
4bf38ea9c2 Fix FileCheck test for back-deployed concurrency.
Fixes rdar://83840279.
2021-10-13 23:26:32 -07:00
Doug Gregor
2551a04621 Back-deploy @objc actor types.
@objc actors implicitly inherit from the new, hidden
`SwiftNativeNSObject` class that inherits from `NSObject` yet provides
Swift-native reference counting, which is important for the actor
runtime's handling of zombies. However, `SwiftNativeNSObject` is only
available in the Swift runtime in newer OS versions (e.g., macOS
12.0/iOS 15.0), and is available in the back-deployed _Concurrency
library, but there is no stable place to link against for
back-deployed code. Tricky, tricky.

When back-deploying @objc actors, record `NSObject` as the superclass
in the metadata in the binary, because we cannot reference
`SwiftNativeNSObject`. Then, emit a static initializer to
dynamically look up `SwiftNativeNSObject` by name (which will find it
in either the back-deployment library, on older systems, or in the
runtime for newer systems), then swizzle that in as the superclass of
the @objc actor.

Fixes rdar://83919973.
2021-10-05 23:04:57 -07:00
Meghana Gupta
24c3e2c330 Disable test/Concurrency/Backdeploy/mangling.swift to unblock CI 2021-10-04 18:17:43 -07:00
Doug Gregor
0ab6355e7c Include SwiftNativeNSObject in the back-deployed concurrency library.
SwiftNativeNSObject is part of the core runtime on OS versions that
also have the concurrency library, so we need to include a copy of
it with the back-deployed concurrency library.
2021-10-03 22:06:59 -07:00
Doug Gregor
24c761b74a Cannot back-deploy mangled names including isolated parameters.
Isolated parameters were introduced with concurrency, so don't mangle
names including them in back-deployed code.
2021-10-03 08:14:26 -07:00
Ben Langmuir
2144f72a03 [test] Disable Concurrency/Backdeploy/mangling.swift with OS stdlib
This test is failing when run on 10.15 and earlier using the OS stdlib.
Disable until we can fix it.

rdar://83465277
2021-09-23 14:26:17 -07:00
Ben Langmuir
5f331bf305 [test] Add REQUIRES: CPU=x86_64 to test that is failing in CI
Failing on macOS-arm64 job.
2021-09-23 07:28:59 -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
8aaf9d6d58 Add missing REQUIRES: CPU=x86_64 to Concurrency test. 2021-09-01 10:22:45 -07:00
Varun Gandhi
b519489dd0 [IRGen] Support back-deployment of concurrency-related function types.
Fixes rdar://76473697.
2021-08-27 13:31:06 -07:00