diff --git a/toolchain/build.sh b/toolchain/build.sh index 2a8dd6f..77da9a3 100644 --- a/toolchain/build.sh +++ b/toolchain/build.sh @@ -144,6 +144,32 @@ elif [ "$model" = "OpenWrt_X86_64_v24.10" ]; then curl -s https://git.kejizero.online/zhao/files/raw/branch/main/toolchain/Configs/immortalwrt_x86_64.config > .config fi +# bpf +[ "$ENABLE_BPF" = "y" ] && curl -s $mirror/openwrt/generic/config-bpf >> .config + +# LTO +export ENABLE_LTO=$ENABLE_LTO +[ "$ENABLE_LTO" = "y" ] && curl -s $mirror/openwrt/generic/config-lto >> .config + +# mold +[ "$ENABLE_MOLD" = "y" ] && echo 'CONFIG_USE_MOLD=y' >> .config + +# glibc +[ "$ENABLE_GLIBC" = "y" ] && { + curl -s $mirror/openwrt/generic/config-glibc >> .config + sed -i '/NaiveProxy/d' .config +} + +# mold +[ "$ENABLE_MOLD" = "y" ] && echo 'CONFIG_USE_MOLD=y' >> .config + +# ccache +if [ "$USE_GCC15" = "y" ] && [ "$ENABLE_CCACHE" = "y" ]; then + echo "CONFIG_CCACHE=y" >> .config + echo "CONFIG_CCACHE_DIR=\"/builder/.ccache\"" >> .config + tools_suffix="_ccache" +fi + # gcc14 & 15 if [ "$USE_GCC13" = y ]; then export USE_GCC13=y gcc_version=13