Files
docker-nginx-full/scripts/build-brotli
T
2024-10-17 15:34:52 +10:00

22 lines
845 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash -e
BLUE='\E[1;34m'
CYAN='\E[1;36m'
YELLOW='\E[1;33m'
GREEN='\E[1;32m'
RESET='\E[0m'
echo -e "${BLUE} ${CYAN}Building brotli ${YELLOW}${LUA_VERSION}...${RESET}"
cd /tmp
git clone --recurse-submodules -j8 "https://github.com/google/ngx_brotli"
cd /tmp/ngx_brotli/deps/brotli
mkdir -p /tmp/ngx_brotli/deps/brotli/out
cd /tmp/ngx_brotli/deps/brotli/out
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 ..
cmake --build . --config Release --target brotlienc
echo -e "${BLUE} ${GREEN}brotli build completed${RESET}"