Add ARM64X support
Extend the aarch64-w64-mingw32 prefix to provide ARM64EC libraries alongside standard AArch64 libraries, replacing the separate arm64ec-w64-mingw32 prefix. This aligns with how MSVC distributes ARM64EC libraries and enables the linker to process both targets simultaneously into a single hybrid binary. This extensively utilizes LLVM's -marm64x option, compiling both targets in a single compiler invocation to produce hybrid object files (unlike MSVC tools, which require separate compilation passes).
This commit is contained in:
1 parent
5e3f73a650
commit
64effa9a71
10 files changed
+127
-33
No files matched your search
+23
-5
@@ -105,6 +105,10 @@ $MAKE install
|
||||
cd ../..
|
||||
if [ -z "$SKIP_INCLUDE_TRIPLET_PREFIX" ]; then
|
||||
for arch in $ARCHS; do
|
||||
case $arch in
|
||||
arm64ec) continue ;;
|
||||
esac
|
||||
|
||||
mkdir -p "$PREFIX/$arch-w64-mingw32"
|
||||
if [ ! -e "$PREFIX/$arch-w64-mingw32/include" ]; then
|
||||
ln -sfn ../generic-w64-mingw32/include "$PREFIX/$arch-w64-mingw32/include"
|
||||
@@ -112,17 +116,24 @@ if [ -z "$SKIP_INCLUDE_TRIPLET_PREFIX" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
ARM64X_FLAGS=""
|
||||
for arch in $ARCHS; do
|
||||
case $arch in
|
||||
arm64ec) ARM64X_FLAGS="--enable-arm64x" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
cd mingw-w64-crt
|
||||
for arch in $ARCHS; do
|
||||
[ -z "$CLEAN" ] || rm -rf build-$arch
|
||||
mkdir -p build-$arch
|
||||
cd build-$arch
|
||||
case $arch in
|
||||
armv7)
|
||||
FLAGS="--disable-lib32 --disable-lib64 --enable-libarm32"
|
||||
;;
|
||||
aarch64|arm64ec)
|
||||
FLAGS="--disable-lib32 --disable-lib64 --enable-libarm64"
|
||||
aarch64)
|
||||
FLAGS="--disable-lib32 --disable-lib64 --enable-libarm64 $ARM64X_FLAGS"
|
||||
;;
|
||||
arm64ec)
|
||||
continue
|
||||
;;
|
||||
i686)
|
||||
FLAGS="--enable-lib32 --disable-lib64"
|
||||
@@ -133,6 +144,9 @@ for arch in $ARCHS; do
|
||||
esac
|
||||
FLAGS="$FLAGS --with-default-msvcrt=$DEFAULT_MSVCRT"
|
||||
FLAGS="$FLAGS --enable-silent-rules"
|
||||
[ -z "$CLEAN" ] || rm -rf build-$arch
|
||||
mkdir -p build-$arch
|
||||
cd build-$arch
|
||||
../configure --host=$arch-w64-mingw32 --prefix="$PREFIX/$arch-w64-mingw32" $FLAGS $CFGUARD_FLAGS $CRT_CONFIG_FLAGS
|
||||
$MAKE -j$CORES
|
||||
$MAKE install
|
||||
@@ -141,6 +155,10 @@ done
|
||||
cd ..
|
||||
|
||||
for arch in $ARCHS; do
|
||||
case $arch in
|
||||
arm64ec) continue ;;
|
||||
esac
|
||||
|
||||
if [ ! -f $PREFIX/$arch-w64-mingw32/lib/libssp.a ]; then
|
||||
# Create empty dummy archives, to avoid failing when the compiler
|
||||
# driver adds "-lssp -lssh_nonshared" when linking.
|
||||
|
||||
Reference in new issue
Block a user