mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-05-21 21:30:48 -05:00
macOS: fix macOS local arm64 build affecting Volume archive
Local macOS builds disable universal binaries. On Apple Silicon, that means the regular objects are built for arm64 only, but Volume.make still selected the macOS assembly bundle. Several of those assembly outputs are x86_64 only, which makes ranlib reject Volume.a because it contains mixed cputypes. Make local arm64 macOS builds use the existing arm64 crypto object path and have the macOS build wrapper export CPU_ARCH/COMPILE_ASM consistently for local builds.
This commit is contained in:
@@ -100,6 +100,8 @@ fi
|
||||
if [ "$local_build" = true ]; then
|
||||
echo "Building VeraCrypt with local wxWidgets support and no universal binary"
|
||||
export LOCAL_DEVELOPMENT_BUILD=true
|
||||
export CPU_ARCH=$(uname -m)
|
||||
export COMPILE_ASM=$( if [[ "$CPU_ARCH" != "arm64" ]]; then echo true; else echo false; fi )
|
||||
fi
|
||||
|
||||
# Check the condition of wxBuildConsole and wxWidgets-$WX_VERSION in the original PARENTDIR
|
||||
|
||||
@@ -41,7 +41,11 @@ endif
|
||||
|
||||
ifeq "$(ENABLE_WOLFCRYPT)" "0"
|
||||
ifeq "$(PLATFORM)" "MacOSX"
|
||||
ifneq "$(COMPILE_ASM)" "false"
|
||||
ifeq "$(LOCAL_DEVELOPMENT_BUILD):$(CPU_ARCH)" "true:arm64"
|
||||
OBJARMV8CRYPTO += ../Crypto/Aes_hw_armv8.oarmv8crypto
|
||||
OBJS += ../Crypto/Aescrypt.o
|
||||
OBJARMV8CRYPTO += ../Crypto/sha256_armv8.oarmv8crypto
|
||||
else ifneq "$(COMPILE_ASM)" "false"
|
||||
OBJSEX += ../Crypto/Aes_asm.oo
|
||||
OBJS += ../Crypto/Aes_hw_cpu.o
|
||||
OBJSEX += ../Crypto/Aes_hw_armv8.oo
|
||||
@@ -58,6 +62,8 @@ ifneq "$(COMPILE_ASM)" "false"
|
||||
OBJSEX += ../Crypto/sha512_avx1.oo
|
||||
OBJSEX += ../Crypto/sha512_avx2.oo
|
||||
OBJSEX += ../Crypto/sha512_sse4.oo
|
||||
else
|
||||
OBJS += ../Crypto/Aescrypt.o
|
||||
endif
|
||||
else ifeq "$(CPU_ARCH)" "x86"
|
||||
OBJS += ../Crypto/Aes_x86.o
|
||||
|
||||
Reference in New Issue
Block a user