Skip to content

Commit 1b0095f

Browse files
committed
Pass CFLAGS to build_simple directly
1 parent b57b4e5 commit 1b0095f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/wheels-dependencies.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,10 @@ BROTLI_VERSION=1.1.0
5454
function build_pkg_config {
5555
if [ -e pkg-config-stamp ]; then return; fi
5656
# This essentially duplicates the Homebrew recipe
57-
ORIGINAL_CFLAGS=$CFLAGS
58-
CFLAGS="$CFLAGS -Wno-int-conversion"
59-
build_simple pkg-config 0.29.2 https://pkg-config.freedesktop.org/releases tar.gz \
57+
CFLAGS="$CFLAGS -Wno-int-conversion" build_simple pkg-config 0.29.2 https://pkg-config.freedesktop.org/releases tar.gz \
6058
--disable-debug --disable-host-tool --with-internal-glib \
6159
--with-pc-path=$BUILD_PREFIX/share/pkgconfig:$BUILD_PREFIX/lib/pkgconfig \
6260
--with-system-include-path=$(xcrun --show-sdk-path --sdk macosx)/usr/include
63-
CFLAGS=$ORIGINAL_CFLAGS
6461
export PKG_CONFIG=$BUILD_PREFIX/bin/pkg-config
6562
touch pkg-config-stamp
6663
}
@@ -130,15 +127,13 @@ function build {
130127
build_lcms2
131128
build_openjpeg
132129

133-
ORIGINAL_CFLAGS=$CFLAGS
134-
CFLAGS="$CFLAGS -O3 -DNDEBUG"
130+
webp_cflags="-O3 -DNDEBUG"
135131
if [[ -n "$IS_MACOS" ]]; then
136-
CFLAGS="$CFLAGS -Wl,-headerpad_max_install_names"
132+
webp_cflags="$webp_cflags -Wl,-headerpad_max_install_names"
137133
fi
138-
build_simple libwebp $LIBWEBP_VERSION \
134+
CFLAGS="$CFLAGS $webp_cflags" build_simple libwebp $LIBWEBP_VERSION \
139135
https://storage.googleapis.com/downloads.webmproject.org/releases/webp tar.gz \
140136
--enable-libwebpmux --enable-libwebpdemux
141-
CFLAGS=$ORIGINAL_CFLAGS
142137

143138
build_brotli
144139

0 commit comments

Comments
 (0)