build: Allow CFLAGS to be passed through on macos.

This commit is contained in:
Erik Abair 2025-01-14 16:01:34 -08:00 committed by mborgerson
parent ebcacad78b
commit 0eddb3ead9
1 changed files with 4 additions and 2 deletions

View File

@ -213,12 +213,14 @@ case "$platform" in # Adjust compilation options based on platform
python3 ./scripts/download-macos-libs.py ${target_arch}
lib_prefix=${PWD}/macos-libs/${target_arch}/opt/local
export CFLAGS="-arch ${target_arch} \
export CFLAGS="${CFLAGS} \
-arch ${target_arch} \
-target ${target_arch}-apple-macos${macos_min_ver} \
-isysroot ${sdk} \
-I${lib_prefix}/include \
-mmacosx-version-min=$macos_min_ver"
export LDFLAGS="-arch ${target_arch} \
export LDFLAGS="${LDFLAGS} \
-arch ${target_arch} \
-isysroot ${sdk}"
if [ "$target_arch" == "x86_64" ]; then
sys_cflags='-march=ivybridge'