Skip to content

Commit a4d7626

Browse files
committed
Pass -target to lit Tests instead of -arch
A follow-on to b436825 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
1 parent 10160cb commit a4d7626

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

test/lit.cfg

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -920,8 +920,8 @@ if run_vendor == 'apple':
920920
target_future_version = "9.99.0"
921921

922922
config.target_cc_options = (
923-
"-arch %s %s" %
924-
(run_cpu, clang_mcp_opt))
923+
"-target %s %s" %
924+
(config.variant_triple, clang_mcp_opt))
925925

926926
config.target_build_swift = (
927927
("%s %s %s -F %r -toolchain-stdlib-rpath " +
@@ -960,8 +960,8 @@ if run_vendor == 'apple':
960960
target_specific_module_triple += "-simulator"
961961

962962
config.target_cc_options = (
963-
"-arch %s %s" %
964-
(run_cpu, clang_mcp_opt))
963+
"-target %s %s" %
964+
(config.variant_triple, clang_mcp_opt))
965965

966966
config.target_build_swift = (
967967
("%s %s %s -F %r -toolchain-stdlib-rpath %s " +
@@ -996,16 +996,9 @@ if run_vendor == 'apple':
996996

997997
xcrun_sdk_name = "macosx"
998998

999-
if run_os == 'maccatalyst':
1000-
# For maccatalyst, pass the target triple to clang
1001-
# rather than arch and version separately.
1002-
config.target_cc_options = (
1003-
"-target %s %s" %
1004-
(config.variant_triple, clang_mcp_opt))
1005-
else:
1006-
config.target_cc_options = (
1007-
"-arch %s %s" %
1008-
(run_cpu, clang_mcp_opt))
999+
config.target_cc_options = (
1000+
"-target %s %s" %
1001+
(config.variant_triple, clang_mcp_opt))
10091002

10101003
maccatalyst_frameworks_component = ""
10111004
if run_os == 'maccatalyst':

test/stdlib/Compatibility50Linking.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// RUN: %target-run %t/main
55
// REQUIRES: objc_interop
66
// REQUIRES: executable_test
7-
// REQUIRES: rdar73174820
87

98
// The compatibility library needs to have no build-time dependencies on
109
// libswiftCore so it can be linked into a program that doesn't link

validation-test/Runtime/class_update_callback_with_fixed_layout.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
// REQUIRES: executable_test
2727
// REQUIRES: objc_interop
28-
// REQUIRES: rdar73174820
2928

3029
#import <objc/runtime.h>
3130
#import <assert.h>

0 commit comments

Comments
 (0)