Skip to content

Commit 0eddb3e

Browse files
abairemborgerson
authored andcommitted
build: Allow CFLAGS to be passed through on macos.
1 parent ebcacad commit 0eddb3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,14 @@ case "$platform" in # Adjust compilation options based on platform
213213

214214
python3 ./scripts/download-macos-libs.py ${target_arch}
215215
lib_prefix=${PWD}/macos-libs/${target_arch}/opt/local
216-
export CFLAGS="-arch ${target_arch} \
216+
export CFLAGS="${CFLAGS} \
217+
-arch ${target_arch} \
217218
-target ${target_arch}-apple-macos${macos_min_ver} \
218219
-isysroot ${sdk} \
219220
-I${lib_prefix}/include \
220221
-mmacosx-version-min=$macos_min_ver"
221-
export LDFLAGS="-arch ${target_arch} \
222+
export LDFLAGS="${LDFLAGS} \
223+
-arch ${target_arch} \
222224
-isysroot ${sdk}"
223225
if [ "$target_arch" == "x86_64" ]; then
224226
sys_cflags='-march=ivybridge'

0 commit comments

Comments
 (0)