Skip to content

Commit 3d49dd5

Browse files
authored
Fix native triple for Raspberry Pi 5 to fix other.test_cmake_compile_features (#25028)
1 parent 4bc1eeb commit 3d49dd5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/clang_native.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414

1515

1616
def get_native_triple():
17+
# On Raspberry Pi 5, the target triple for native compilation must exactly
18+
# match 'aarch64-linux-gnu', or clang will not find the native sysroot.
19+
# Users on a Pi 5 can set environment variable
20+
# EMTEST_NATIVE_COMPILATION_TRIPLE=aarch64-linux-gnu
21+
# to be able to override the native triple for Pi 5 compilation.
22+
native_compilation_triple = os.getenv('EMTEST_NATIVE_COMPILATION_TRIPLE')
23+
if native_compilation_triple:
24+
return native_compilation_triple
25+
1726
arch = {
1827
'aarch64': 'arm64',
1928
'arm64': 'arm64',

0 commit comments

Comments
 (0)