Skip to content

Commit a06f2f3

Browse files
committed
WIP: Apply a couple of patches on llvm-project
1 parent d9fef25 commit a06f2f3

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ jobs:
403403
env:
404404
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
405405
run: |
406+
git config --global user.name "LLVM MinGW"
407+
git config --global user.email root@localhost
406408
bash -c "CHECKOUT_ONLY=1 ./build-llvm.sh"
407409
- name: Build and test libcxx
408410
run: |
@@ -532,6 +534,8 @@ jobs:
532534
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
533535
run: |
534536
git config --global core.autocrlf false
537+
git config --global user.name "LLVM MinGW"
538+
git config --global user.email root@localhost
535539
bash -c "CHECKOUT_ONLY=1 ./build-llvm.sh"
536540
- name: Build test executables
537541
run: |

build-llvm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
120120
;;
121121
esac
122122
fi
123+
git am -3 ../patches/llvm-project/*.patch
123124
cd ..
124125
fi
125126

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 34c2e60b2d15206a63ed6bb486124d5ea8748484 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <[email protected]>
3+
Date: Fri, 23 May 2025 12:35:46 +0300
4+
Subject: [PATCH 1/2] [compiler-rt] [test] Don't apply the "arm" or "armhf"
5+
patterns for targets starting with "arm64"
6+
7+
This fixes finding the builtins library for arm64ec.
8+
---
9+
compiler-rt/test/lit.common.configured.in | 2 +-
10+
1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+
diff --git a/compiler-rt/test/lit.common.configured.in b/compiler-rt/test/lit.common.configured.in
13+
index f673a13be9cb..04d1a4df5a54 100644
14+
--- a/compiler-rt/test/lit.common.configured.in
15+
+++ b/compiler-rt/test/lit.common.configured.in
16+
@@ -69,7 +69,7 @@ elif config.android:
17+
else:
18+
set_default("target_suffix", "-%s-android" % config.target_arch)
19+
else:
20+
- if config.target_arch.startswith("arm"):
21+
+ if config.target_arch.startswith("arm") and not config.target_arch.startswith("arm64"):
22+
if config.target_arch.endswith("hf"):
23+
set_default("target_suffix", "-armhf")
24+
else:
25+
--
26+
2.43.0
27+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 2e1e95d0cb01aa75d5ae06af459325afff6c0a78 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <[email protected]>
3+
Date: Fri, 23 May 2025 13:38:31 +0300
4+
Subject: [PATCH 2/2] [libcxx] [test] Extend mingw target checks to cover the
5+
arm64ec architecture too
6+
7+
---
8+
.../new.delete/new.delete.array/sized_delete_array.pass.cpp | 1 +
9+
.../new.delete/new.delete.single/sized_delete.pass.cpp | 1 +
10+
2 files changed, 2 insertions(+)
11+
12+
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
13+
index dd0b1d60d28d..175cda39abc2 100644
14+
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
15+
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
16+
@@ -19,6 +19,7 @@
17+
// ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation
18+
// ADDITIONAL_COMPILE_FLAGS(target=aarch64-w64-windows-gnu): -fsized-deallocation
19+
// ADDITIONAL_COMPILE_FLAGS(target=armv7-w64-windows-gnu): -fsized-deallocation
20+
+// ADDITIONAL_COMPILE_FLAGS(target=arm64ec-w64-windows-gnu): -fsized-deallocation
21+
22+
// Android clang-r536225 identifies as clang-19.0 but it predates the real
23+
// LLVM 19.0.0, so it also leaves sized deallocation off by default.
24+
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
25+
index 9469af1c78f3..29229650cc19 100644
26+
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
27+
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
28+
@@ -19,6 +19,7 @@
29+
// ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation
30+
// ADDITIONAL_COMPILE_FLAGS(target=aarch64-w64-windows-gnu): -fsized-deallocation
31+
// ADDITIONAL_COMPILE_FLAGS(target=armv7-w64-windows-gnu): -fsized-deallocation
32+
+// ADDITIONAL_COMPILE_FLAGS(target=arm64ec-w64-windows-gnu): -fsized-deallocation
33+
34+
// Android clang-r536225 identifies as clang-19.0 but it predates the real
35+
// LLVM 19.0.0, so it also leaves sized deallocation off by default.
36+
--
37+
2.43.0
38+

0 commit comments

Comments
 (0)