From 0eddb3ead943aa082a223b9484d75678940dcad9 Mon Sep 17 00:00:00 2001 From: Erik Abair Date: Tue, 14 Jan 2025 16:01:34 -0800 Subject: [PATCH] build: Allow CFLAGS to be passed through on macos. --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 23e4210068..3e0ef7e8f2 100755 --- a/build.sh +++ b/build.sh @@ -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'