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.
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.
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.
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.