Skip to content

Commit 8a7f8cc

Browse files
authored
Adjust clang's multilib flags test to cope with missing variant (#504)
The clang driver's `print-multi-selection-flags.c` test uses a combination of command line options in one of its RUN lines for which we don't have a valid library variant available. Since the merging of PR #500, this combination of options now trigger an error to inform the user of an unsupported setup, but this error also causes the test to fail. This adds a new patch file for llvm-project to adjust the test accordingly.
1 parent 1835df7 commit 8a7f8cc

6 files changed

+40
-15
lines changed

patches/llvm-project/0001-libc-tests-with-picolibc-xfail-one-remaining-test.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
From 1db48238bfbc5324dadf828532a4c67524dc471b Mon Sep 17 00:00:00 2001
1+
From fd26b5fd6a882677062a7c495660f22ca2b13cd5 Mon Sep 17 00:00:00 2001
22
From: =?UTF-8?q?Dominik=20W=C3=B3jt?= <[email protected]>
33
Date: Mon, 16 Oct 2023 11:35:48 +0200
4-
Subject: [PATCH] [libc++] tests with picolibc: xfail one remaining test
4+
Subject: [libc++] tests with picolibc: xfail one remaining test
55

66
---
77
.../language.support/support.start.term/quick_exit.pass.cpp | 3 +++
88
1 file changed, 3 insertions(+)
99

1010
diff --git a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
11-
index d8eff69cb5..e16048df72 100644
11+
index d8eff69cb53f..e16048df722e 100644
1212
--- a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
1313
+++ b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
1414
@@ -17,6 +17,9 @@
@@ -22,5 +22,5 @@ index d8eff69cb5..e16048df72 100644
2222

2323
void f() {}
2424
--
25-
2.34.1
25+
2.39.5 (Apple Git-154)
2626

patches/llvm-project/0002-libc-tests-with-picolibc-disable-large-tests.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 80000ddfade0f706ad1ebb488a51132a88cbe61d Mon Sep 17 00:00:00 2001
1+
From 02175d0f237e5d14c6b59ce6b16818927f10368f Mon Sep 17 00:00:00 2001
22
From: =?UTF-8?q?Dominik=20W=C3=B3jt?= <[email protected]>
33
Date: Wed, 15 Nov 2023 12:18:35 +0100
44
Subject: [libc++] tests with picolibc: disable large tests
@@ -41,7 +41,7 @@ index b5f9089308d2..0a83e75ceceb 100644
4141
set(LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
4242
find_program(QEMU_SYSTEM_ARM qemu-system-arm REQUIRED)
4343
diff --git a/libcxxabi/test/test_demangle.pass.cpp b/libcxxabi/test/test_demangle.pass.cpp
44-
index fe5598991b83..65d30a352814 100644
44+
index 77f79e0d40e8..4b69df08ea28 100644
4545
--- a/libcxxabi/test/test_demangle.pass.cpp
4646
+++ b/libcxxabi/test/test_demangle.pass.cpp
4747
@@ -7,7 +7,7 @@
@@ -54,5 +54,5 @@ index fe5598991b83..65d30a352814 100644
5454
// https://llvm.org/PR51407 was not fixed in some previously-released
5555
// demanglers, which causes them to run into the infinite loop.
5656
--
57-
2.34.1
57+
2.39.5 (Apple Git-154)
5858

patches/llvm-project/0003-Disable-failing-compiler-rt-test.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From c4837fa13ec89cc06b07af8cba8494189520e546 Mon Sep 17 00:00:00 2001
1+
From d1d619643bedea5759ef56ed42c4d97846f3c789 Mon Sep 17 00:00:00 2001
22
From: Piotr Przybyla <[email protected]>
33
Date: Wed, 15 Nov 2023 16:04:24 +0000
44
Subject: Disable failing compiler-rt test
@@ -18,5 +18,5 @@ index 2ff65a8b9ec3..98611a75e85f 100644
1818
// RUN: %clang_builtins %s %librt -o %t && %run %t
1919

2020
--
21-
2.34.1
21+
2.39.5 (Apple Git-154)
2222

patches/llvm-project/0004-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 3b7ada947d511fe0edb7cca0dbdb640d8e1ecd2b Mon Sep 17 00:00:00 2001
1+
From 46019866b66f8859e7dff666c519c35d5b921291 Mon Sep 17 00:00:00 2001
22
From: =?UTF-8?q?Dominik=20W=C3=B3jt?= <[email protected]>
33
Date: Thu, 9 Nov 2023 15:25:14 +0100
44
Subject: [libc++] tests with picolibc: XFAIL uses of atomics
@@ -88,10 +88,10 @@ index 000000000000..5ecc58f3e385
8888
+if "has-no-atomics" in config.available_features:
8989
+ config.unsupported = True
9090
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
91-
index 6ef40755c59d..6c2960260189 100644
91+
index 15456171b548..ddd44a63c618 100644
9292
--- a/libcxx/utils/libcxx/test/features.py
9393
+++ b/libcxx/utils/libcxx/test/features.py
94-
@@ -206,6 +206,21 @@ DEFAULT_FEATURES = [
94+
@@ -215,6 +215,21 @@ DEFAULT_FEATURES = [
9595
""",
9696
),
9797
),
@@ -114,5 +114,5 @@ index 6ef40755c59d..6c2960260189 100644
114114
Feature(
115115
name="32-bit-pointer",
116116
--
117-
2.34.1
117+
2.39.5 (Apple Git-154)
118118

patches/llvm-project/0005-libc-tests-with-picolibc-mark-two-more-large-tests.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 8eb9344a4ba97b45cea1a6adec98aff6c6149359 Mon Sep 17 00:00:00 2001
1+
From e3d01a7a6d51fe1f2d605a49123e72e2f493a532 Mon Sep 17 00:00:00 2001
22
From: =?UTF-8?q?Dominik=20W=C3=B3jt?= <[email protected]>
33
Date: Wed, 22 Nov 2023 16:12:39 +0100
44
Subject: [libc++] tests with picolibc: mark two more large tests
@@ -37,5 +37,5 @@ index 64a6a135adda..057301e6f868 100644
3737
// bool
3838
// regex_search(BidirectionalIterator first, BidirectionalIterator last,
3939
--
40-
2.34.1
40+
2.39.5 (Apple Git-154)
4141

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 226969b13351bc60ac0e6776dedf3b8396747ced Mon Sep 17 00:00:00 2001
2+
From: Lucas Prates <[email protected]>
3+
Date: Wed, 18 Sep 2024 11:43:03 +0100
4+
Subject: [Clang][Driver] Adjust test to cope with unsupported multilib variant
5+
6+
---
7+
clang/test/Driver/print-multi-selection-flags.c | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/clang/test/Driver/print-multi-selection-flags.c b/clang/test/Driver/print-multi-selection-flags.c
11+
index 0116c7f5a03b..e2c89a083e2c 100644
12+
--- a/clang/test/Driver/print-multi-selection-flags.c
13+
+++ b/clang/test/Driver/print-multi-selection-flags.c
14+
@@ -30,7 +30,7 @@
15+
// CHECK-MVE: -mfloat-abi=hard
16+
// CHECK-MVE: -mfpu=fp-armv8-fullfp16-sp-d16
17+
18+
-// RUN: %clang -print-multi-flags-experimental --target=arm-none-eabi -march=armv8.1m.main+mve+nofp | FileCheck --check-prefix=CHECK-MVENOFP %s
19+
+// RUN: not %clang -print-multi-flags-experimental --target=arm-none-eabi -march=armv8.1m.main+mve+nofp | FileCheck --check-prefix=CHECK-MVENOFP %s
20+
// CHECK-MVENOFP: -march=thumbv8.1m.main{{.*}}+mve{{.*}}
21+
// CHECK-MVENOFP-NOT: -march=thumbv8.1m.main{{.*}}+mve.fp{{.*}}
22+
// CHECK-MVENOFP: -mfpu=none
23+
--
24+
2.39.5 (Apple Git-154)
25+

0 commit comments

Comments
 (0)