Skip to content

Commit 34baebf

Browse files
committed
Switch brotli build for non-64 arch
1 parent 5d4df92 commit 34baebf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/build-brotli

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ RESET='\E[0m'
88

99
echo -e "${BLUE}${CYAN}Building brotli ${YELLOW}${LUA_VERSION}...${RESET}"
1010

11+
# Determine the correct binary file for the architecture given
12+
M64="-m64"
13+
if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then
14+
M64=
15+
fi
16+
1117
cd /tmp
1218
git clone --recurse-submodules -j8 "https://github.com/google/ngx_brotli"
1319
cd /tmp/ngx_brotli/deps/brotli
1420

1521
mkdir -p /tmp/ngx_brotli/deps/brotli/out
1622
cd /tmp/ngx_brotli/deps/brotli/out
1723

18-
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed ..
24+
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast $M64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed ..
1925
cmake --build . --config Release --target brotlienc
2026

2127
echo -e "${BLUE}${GREEN}brotli build completed${RESET}"

0 commit comments

Comments
 (0)