Skip to content

Commit 8c0ea7f

Browse files
committed
Use xcselect only for -macosx triples
Using them for `-darwin*` triples makes many tests fail.
1 parent dc195bd commit 8c0ea7f

17 files changed

+5
-43
lines changed

clang/lib/Driver/ToolChains/Darwin.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,9 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
22712271
}
22722272
}
22732273
#ifdef CLANG_USE_XCSELECT
2274-
else if (getTriple().isMacOSX()) {
2274+
// FIXME: This should check for `getTriple().isMacOSX()`, but this breaks
2275+
// many tests. See https://github.com/llvm/llvm-project/pull/119670.
2276+
else if (getTriple().getOS() == llvm::Triple::MacOSX) {
22752277
char *p;
22762278
if (!::xcselect_host_sdk_path(CLANG_XCSELECT_HOST_SDK_POLICY, &p)) {
22772279
Args.append(Args.MakeSeparateArg(

clang/test/Driver/arc.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// RUN: not %clang -ObjC -target i386-apple-darwin10 -stdlib=libstdc++ -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
52
// RUN: not %clang -x objective-c -target i386-apple-darwin10 -stdlib=libstdc++ -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
63
// RUN: not %clang -x objective-c++ -target i386-apple-darwin10 -stdlib=libstdc++ -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s

clang/test/Driver/clang-g-opts.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// RUN: %clang -### -S %s 2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
52
// RUN: %clang -### -S %s -g -target x86_64-linux-gnu 2>&1 \
63
// RUN: | FileCheck --check-prefix=CHECK-WITH-G %s

clang/test/Driver/clang-translation.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// RUN: %clang -target i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -fvisibility=hidden 2>&1 | FileCheck -check-prefix=I386 %s
52
// I386: "-triple" "i386-unknown-unknown"
63
// I386: "-S"

clang/test/Driver/darwin-builtin-modules.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// Check that darwin passes -fbuiltin-headers-in-system-modules
52
// when expected.
63

clang/test/Driver/darwin-debug-flags.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// RUN: env RC_DEBUG_OPTIONS=1 %clang -target i386-apple-darwin11 -I "path with \spaces" -g -Os %s -emit-llvm -S -o - | FileCheck %s
52
// RUN: touch %t.s
63
// RUN: env RC_DEBUG_OPTIONS=1 %clang -### -target i386-apple-darwin11 -c -g %t.s 2>&1 | FileCheck -check-prefix=S %s

clang/test/Driver/darwin-header-search-system.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// UNSUPPORTED: system-windows
2-
// XFAIL: xcselect
3-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
42

53
// General tests that the system header search paths detected by the driver
64
// and passed to CC1 are correct on Darwin platforms.

clang/test/Driver/darwin-ld-platform-version-macos.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// XFAIL: xcselect
22
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3+
// See https://github.com/llvm/llvm-project/pull/119670.
34

45
// RUN: touch %t.o
56

clang/test/Driver/darwin-ld.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// Check that ld gets arch_multiple.
52

63
// RUN: %clang -target i386-apple-darwin9 -arch i386 -arch x86_64 %s -### -o foo 2> %t.log

clang/test/Driver/darwin-multiarch-arm.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// Check that we compile correctly with multiple ARM -arch options.
52
//
63
// RUN: %clang -target arm7-apple-darwin10 -### \

clang/test/Driver/darwin-objc-options.m

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// Check miscellaneous Objective-C options.
52

63
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \

clang/test/Driver/darwin-version.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \
52
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX %s
63
// CHECK-VERSION-OSX: "armv6k-apple-macosx10.5.0"

clang/test/Driver/debug-options.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// Check to make sure clang is somewhat picky about -g options.
52

63
// Linux.

clang/test/Driver/fsanitize.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP
52
// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined -fno-sanitize-trap=signed-integer-overflow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP2
63
// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP

clang/test/Driver/macos-apple-silicon-slice-link-libs.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// RUN: %clang -### -target arm64-apple-macos10.7 %s 2>&1 | FileCheck -check-prefix=ARM64-10_7 %s
52
// RUN: %clang -### -target x86_64-apple-macos10.7 %s 2>&1 | FileCheck -check-prefix=x86_64-10_7 %s
63
// RUN: %clang -### -target arm64-apple-darwin6 %s 2>&1 | FileCheck -check-prefix=ARM64-10_7 %s

clang/test/Driver/target-triple-deployment.c

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFAIL: xcselect
2-
// FIXME: There's no reason why this should fail with CLANG_USE_XCSELECT.
3-
41
// RUN: touch %t.o
52
// RUN: %clang -fuse-ld= -target x86_64-apple-macosx10.4 -mlinker-version=400 -### %t.o 2> %t.log
63
// RUN: %clang -fuse-ld= -target x86_64-apple-darwin9 -mlinker-version=400 -### %t.o 2>> %t.log

clang/test/Driver/xcselect.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: xcselect
2-
// RUN: %clang -target arm64-apple-darwin -c -### %s 2> %t.log
2+
// RUN: %clang -target arm64-apple-macosx -c -### %s 2> %t.log
33
// RUN: FileCheck %s <%t.log
44

55
// CHECK: "-isysroot" "{{.*}}/SDKs/MacOSX{{([0-9]+(\.[0-9]+)?)?}}.sdk"

0 commit comments

Comments
 (0)