Files
swift-mirror/test/stdlib/Compatibility50Linking.c
Robert Widmann a4d76261f0 Pass -target to lit Tests instead of -arch
A follow-on to b436825948 where
-m${platform}-version-min was traded for -target. The lit substitution
for %target-clang was relying on -arch and -version-min to specify the
intended platform version to the linker. With the removal of
version-min, only arch was given, so a fallback platform was selected.
For the iPhone simulator, for example, this is iOS 10.99 despite there
being no such simulator for that deployment version. Provide the variant
triple everywhere instead. This has the added benefit of unifying the
special paths catalyst takes.

Fixes rdar://73174820
2021-01-14 13:33:30 -08:00

15 lines
626 B
C

// RUN: %empty-directory(%t)
// RUN: %target-clang %s -all_load %test-resource-dir/%target-sdk-name/libswiftCompatibility50.a %test-resource-dir/%target-sdk-name/libswiftCompatibility51.a -lobjc -o %t/main
// RUN: %target-codesign %t/main
// RUN: %target-run %t/main
// REQUIRES: objc_interop
// REQUIRES: executable_test
// The compatibility library needs to have no build-time dependencies on
// libswiftCore so it can be linked into a program that doesn't link
// libswiftCore, but will load it at runtime, such as xctest.
//
// Test this by linking it into a plain C program and making sure it builds.
int main(void) {}