Last active
October 28, 2024 07:32
-
-
Save Benitoite/0eb21b605526edbb21d77ef002a9ca06 to your computer and use it in GitHub Desktop.
Builds ART on arm64 macOS (Apple Silicon)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd | |
cd art | |
sudo chown rb build | |
sudo rm -r build | |
mkdir build | |
cd build | |
git checkout master | |
cmake -DCMAKE_BUILD_TYPE="Release" \ | |
-DCMAKE_OSX_ARCHITECTURES=arm64 \ | |
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.3 \ | |
-DPROC_TARGET_NUMBER="11" -DPROC_LABEL="arm64" \ | |
-DCACHE_NAME_SUFFIX="1" -DCMAKE_C_COMPILER="clang" \ | |
-DCMAKE_CXX_COMPILER="clang++" -DWITH_LTO="ON" \ | |
-DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk" \ | |
-DCMAKE_OSX_DEPLOYMENT_TARGET="12.3" -DLOCAL_PREFIX:STRING="/opt/homebrew" \ | |
-DLENSFUNDBDIR="/Applications/ART.app/Contents/Resources/share/lensfun" \ | |
-DCODESIGNID:STRING="Developer ID Application: Doctor Who (ABCDE12345)" \ | |
-DNOTARY:STRING="--apple-id [email protected] --team-id ABCDE12345 --password abcd-efgh-ijkl-mnop" \ | |
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG=1 -I/opt/homebrew/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include -Wno-pass-failed -arch arm64 -Wno-deprecated-register -Wno-unused-command-line-argument -std=c++11" \ | |
-DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG=1 -I/opt/homebrew/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include -Wno-pass-failed -arch arm64 -Wno-deprecated-register -Wno-unused-command-line-argument" \ | |
-DCMAKE_EXE_LINKER_FLAGS="-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib -Wl,-headerpad_max_install_names -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -arch arm64" \ | |
-DOpenMP_C_FLAGS="-fopenmp=lomp" -DOpenMP_CXX_FLAGS=-fopenmp=lomp -DOpenMP_C_LIB_NAMES="libomp" -DOpenMP_CXX_LIB_NAMES="libomp" \ | |
-DOpenMP_libomp_LIBRARY="/opt/homebrew/opt/libomp/lib/libomp.dylib" \ | |
-DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /opt/homebrew/opt/libomp/lib/libomp.dylib -I/opt/homebrew/opt/libomp/include" \ | |
-DOpenMP_CXX_LIB_NAMES="libomp" \ | |
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /opt/homebrew/opt/libomp/lib/libomp.dylib -I/opt/homebrew/opt/libomp/include" \ | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
-DCMAKE_RANLIB=/usr/bin/ranlib \ | |
-DCMAKE_AR=/usr/bin/ar \ | |
-DOpenMP_libomp_LIBRARY=/opt/homebrew/opt/libomp/lib/libomp.dylib \ | |
-DFANCY_DMG=ON \ | |
-DENABLE_CTL=ON \ | |
-DCTL_INCLUDE_DIR=/opt/homebrew/opt/ctl/include/CTL \ | |
-DOSX_UNIVERSAL=ON \ | |
-DOSX_UNIVERSAL_URL:STRING="file:///Volumes/Public/ART_macOS_x86_64_latest.zip" \ | |
.. | |
make -j8 install | |
sudo make macosx_bundle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment