Revert "Add ARM64X support"

This reverts commit 64effa9a71.

It turns out that the LLD handling of the TLS data structures
("_tls_used" and "_tls_index") needs more work, causing the
arm64ec side of arm64x binaries to not get them hooked up properly.
This commit is contained in:
Martin Storsjö committed 2026-07-28 18:44:59 +03:00
1 parent c77d93ace9
commit 975930b5b7
10 files changed
+33 -127

No files matched your search

+22 -22
View File
@@ -134,26 +134,7 @@ if [ -n "$NATIVE" ]; then
exit 0
fi
ARM64X_FLAGS=""
if [ -z "$SANITIZERS" ]; then
for arch in $ARCHS; do
case $arch in
arm64ec) ARM64X_FLAGS="-marm64x" ;;
esac
done
fi
for arch in $ARCHS; do
FLAGS=""
case $arch in
aarch64)
FLAGS="$ARM64X_FLAGS"
;;
arm64ec)
continue
;;
esac
[ -z "$CLEAN" ] || rm -rf build-$arch$BUILD_SUFFIX
mkdir -p build-$arch$BUILD_SUFFIX
cd build-$arch$BUILD_SUFFIX
@@ -179,12 +160,17 @@ for arch in $ARCHS; do
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \
-DSANITIZER_CXX_ABI=libc++ \
-DCMAKE_C_FLAGS_INIT="$CFGUARD_CFLAGS $FLAGS" \
-DCMAKE_CXX_FLAGS_INIT="$CFGUARD_CFLAGS $FLAGS" \
-DCMAKE_ASM_FLAGS_INIT="$FLAGS" \
-DCMAKE_C_FLAGS_INIT="$CFGUARD_CFLAGS" \
-DCMAKE_CXX_FLAGS_INIT="$CFGUARD_CFLAGS" \
$SRC_DIR
cmake --build . ${CORES:+-j${CORES}}
# Skip install on arm64ec, we merge archives instead.
if [ "$arch" = "arm64ec" ]; then
cd ..
continue
fi
cmake --install . --prefix "$INSTALL_PREFIX"
mkdir -p "$PREFIX/$arch-w64-mingw32/bin"
if [ -n "$SANITIZERS" ]; then
@@ -212,6 +198,20 @@ for arch in $ARCHS; do
cd ..
done
# Clang expects the aarch64 compiler-rt name on ARM64EC. While this could be adjusted
# in Clang, the current approach mirrors MSVC, where the core CRT is provided as
# archives containing both EC and native support. Ideally, the LLVM build system would
# handle this automatically, but for now we can merge it here.
for arch in $ARCHS; do
if [ "$arch" = "arm64ec" ]; then
rm -f "$INSTALL_PREFIX/lib/windows/libclang_rt.builtins-aarch64.a" \
"$INSTALL_PREFIX/lib/windows/libclang_rt.builtins-arm64ec.a"
"$PREFIX/bin/llvm-lib" -machine:arm64ec "-out:$INSTALL_PREFIX/lib/windows/libclang_rt.builtins-aarch64.a" \
build-aarch64/lib/windows/libclang_rt.builtins-aarch64.a \
build-arm64ec/lib/windows/libclang_rt.builtins-arm64ec.a
fi
done
if [ "$INSTALL_PREFIX" != "$CLANG_RESOURCE_DIR" ]; then
# symlink to system headers - skip copy
rm -rf "$INSTALL_PREFIX/include"