2021-02-12 19:15:39 +01:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2022-12-02 11:40:55 +01:00
|
|
|
# This file sets the appropriate compiler and flags for compiling for macOS
|
2021-02-12 19:15:39 +01:00
|
|
|
sdk=macosx
|
2022-01-30 00:10:40 +02:00
|
|
|
export OSX_OSVER=10.11
|
2021-02-12 19:15:39 +01:00
|
|
|
|
|
|
|
export OSX_ARCHES="x86_64 arm64"
|
2022-09-25 12:10:27 +02:00
|
|
|
export OSX_ARCHITECTURES="x86_64;arm64"
|
2022-01-30 00:10:40 +02:00
|
|
|
export OSX_ARCH="-arch x86_64 -arch arm64"
|
2021-02-12 19:15:39 +01:00
|
|
|
|
|
|
|
export OSX_COMPILER=$(xcrun --sdk $sdk --find clang)
|
|
|
|
export OSX_CC=$OSX_COMPILER
|
|
|
|
export OSX_CXX=$OSX_COMPILER
|
2023-06-27 01:48:52 +03:00
|
|
|
export OSX_FLAGS="-isysroot $(xcrun --sdk $sdk --show-sdk-path) -mmacosx-version-min=$OSX_OSVER -fdata-sections -ffunction-sections -Ofast"
|