diff options
author | Deniz Türkoglu <denizt@users.noreply.github.com> | 2024-06-16 18:39:18 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-16 10:39:18 +0200 |
commit | 406a1686f5c19fe952125c2df23ea75fa0471bca (patch) | |
tree | 27716ffb2b3ad77407d5fc7c61bc4241a3cc57f6 /src/Volume | |
parent | 455a4f2176a5cfbe325e1e40cea20dd3e466b64c (diff) | |
download | VeraCrypt-406a1686f5c19fe952125c2df23ea75fa0471bca.tar.gz VeraCrypt-406a1686f5c19fe952125c2df23ea75fa0471bca.zip |
Improve and simplify macOS builds (#1276)
* Add missing macOS requirement for 'make package'
We need packages for the last build step on macOS, update docs
to reflect the requirement.
* Add build instructions using homebrew
On macOS, we can use a package manager to easily install
dependencies. This simplifies onboarding and building Veracrypt.
* Add flag to use homebrew packages
When building, we can use prebuilt wxwidgets from homebrew to
simplify and speed up local building. We also put the package
behind a flag as it's optional during development.
* Skip signing for local builds
When building with homebrew, skip signing. This can be put behind
a flag to enable, if needed.
* Use system yasm on macOS if available
The binary in the repo is not universal (x86_64) and therefore
building fails on arm architecture if Rosetta is not installed.
Use local yasm if available.
* Build local arch only in development
When building via homebrew and locally, build only the local arch
which skips ASM for arm(Mx) for MacOS. This removes the need to
have rosetta installed for building.
* Fix compilation issue when COMPILE_ASM is undefined
Use a conditional check for COMPILE_ASM not being false instead of true.
This avoids passing the variable to other parts of the build script.
* Set SDK 12 as the minimum requirement and target
Align the requirement to SDK 12 in both the makefile and script,
and update the comment to remove confusion.
I chose to leave this on 12 to be on the side of err and support
as many building platforms as possible, when we can support.
The local script now also sets the target using the local sdk
version. This should improve the local development experience.
* Fix wrong architecture for macOS in x86 builds
We now build only the current arch for local development builds
in macOS. This change also fixes the x86 builds failing.
* Add instructions brew backed macOS local builds
Flags to build a local build using homebrew packages are not
default and require parameter -b to build. We also don't build
packages directly, which requires -p.
* Fix wxwidgets not linking in local x86 macOS development builds
* Clarify build location in the document
Diffstat (limited to 'src/Volume')
-rw-r--r-- | src/Volume/Volume.make | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Volume/Volume.make b/src/Volume/Volume.make index b6d9e99e..c02bbdf1 100644 --- a/src/Volume/Volume.make +++ b/src/Volume/Volume.make @@ -37,6 +37,7 @@ endif ifeq "$(ENABLE_WOLFCRYPT)" "0" ifeq "$(PLATFORM)" "MacOSX" +ifneq "$(COMPILE_ASM)" "false" OBJSEX += ../Crypto/Aes_asm.oo OBJS += ../Crypto/Aes_hw_cpu.o OBJS += ../Crypto/Aescrypt.o @@ -76,6 +77,7 @@ else ifeq "$(CPU_ARCH)" "x64" else OBJS += ../Crypto/Aescrypt.o endif +endif ifeq "$(GCC_GTEQ_430)" "1" OBJSSSE41 += ../Crypto/blake2s_SSE41.osse41 @@ -129,6 +131,7 @@ VolumeLibrary: Volume.a ifeq "$(ENABLE_WOLFCRYPT)" "0" ifeq "$(PLATFORM)" "MacOSX" +ifneq "$(COMPILE_ASM)" "false" ../Crypto/Aes_asm.oo: ../Crypto/Aes_x86.asm ../Crypto/Aes_x64.asm @echo Assembling $(<F) $(AS) $(ASFLAGS32) -o ../Crypto/Aes_x86.o ../Crypto/Aes_x86.asm @@ -137,7 +140,7 @@ ifeq "$(PLATFORM)" "MacOSX" rm -fr ../Crypto/Aes_x86.o ../Crypto/Aes_x64.o ../Crypto/Twofish_asm.oo: ../Crypto/Twofish_x64.S @echo Assembling $(<F) - $(AS) $(ASFLAGS64) -p gas -o ../Crypto/Twofish_asm.oo ../Crypto/Twofish_x64.S + $(AS) $(ASFLAGS64) -p gas -o ../Crypto/Twofish_asm.oo ../Crypto/Twofish_x64.S ../Crypto/Camellia_asm.oo: ../Crypto/Camellia_x64.S @echo Assembling $(<F) $(AS) $(ASFLAGS64) -p gas -o ../Crypto/Camellia_asm.oo ../Crypto/Camellia_x64.S @@ -173,5 +176,6 @@ ifeq "$(PLATFORM)" "MacOSX" $(AS) $(ASFLAGS64) -o ../Crypto/sha512_sse4.oo ../Crypto/sha512_sse4_x64.asm endif endif +endif include $(BUILD_INC)/Makefile.inc |