Add back stripping and use GCC LTO

I have tested this to work fine for a few days now

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2022-05-08 20:29:52 +05:30
parent 33cb215065
commit 99868f5986
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -24,10 +24,14 @@ RUN nimble build --passL:-L/usr/lib \
--passl:-lsqlite3 \ --passl:-lsqlite3 \
--passl:-lcrypto \ --passl:-lcrypto \
--passL:-static \ --passL:-static \
--passL:"-flto" \
-d:release \ -d:release \
--opt:speed \ --opt:speed \
--accept --accept
RUN strip -s /app/nim_censor_bot && \
strip -R .comment -R .note -R .note.ABI-tag /app/nim_censor_bot
FROM scratch FROM scratch
COPY --from=builder /app/nim_censor_bot / COPY --from=builder /app/nim_censor_bot /