Skip to content

Commit

Permalink
build: Allow CFLAGS to be passed through on macos.
Browse files Browse the repository at this point in the history
  • Loading branch information
abaire committed Jan 15, 2025
1 parent ebcacad commit bb109e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit bb109e9

Please sign in to comment.