This commit is contained in:
Para Dox
2025-05-25 15:49:51 +07:00
parent 3d10d7b32b
commit 1feac516b4

View File

@@ -13,6 +13,9 @@ RUN apt-get update && apt-get install -y \
wget \ wget \
ninja-build \ ninja-build \
ccache \ ccache \
autoconf \
automake \
libtool \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Set up clang as default C/C++ compiler # Set up clang as default C/C++ compiler
@@ -79,10 +82,10 @@ ENV LD=/usr/local/bin/mold
ENV SCCACHE_DIR=/tmp/sccache ENV SCCACHE_DIR=/tmp/sccache
ENV RUSTC_WRAPPER=/usr/local/bin/sccache ENV RUSTC_WRAPPER=/usr/local/bin/sccache
# Set aggressive C/C++ flags for dependencies (will be overridden per architecture) # Set C/C++ flags for dependencies
ENV CFLAGS_BASE="-O3 -flto=thin -fomit-frame-pointer -fno-semantic-interposition -funroll-loops -ffast-math" ENV CFLAGS_BASE="-O3 -fomit-frame-pointer"
ENV CXXFLAGS_BASE="-O3 -flto=thin -fomit-frame-pointer -fno-semantic-interposition -funroll-loops -ffast-math" ENV CXXFLAGS_BASE="-O3 -fomit-frame-pointer"
ENV LDFLAGS="-Wl,-O3 -Wl,--as-needed -Wl,--gc-sections -fuse-ld=/usr/local/bin/mold" ENV LDFLAGS="-Wl,-O3 -Wl,--as-needed -Wl,--gc-sections"
# Configure architecture-specific flags and build # Configure architecture-specific flags and build
RUN --mount=type=cache,target=/usr/local/cargo/registry \ RUN --mount=type=cache,target=/usr/local/cargo/registry \