From 99868f5986705bf894457c4fb145e9b3bf8d862f Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Sun, 8 May 2022 20:29:52 +0530 Subject: [PATCH] Add back stripping and use GCC LTO I have tested this to work fine for a few days now Signed-off-by: baalajimaestro --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index b0e627d..27c5654 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,10 +24,14 @@ RUN nimble build --passL:-L/usr/lib \ --passl:-lsqlite3 \ --passl:-lcrypto \ --passL:-static \ + --passL:"-flto" \ -d:release \ --opt:speed \ --accept +RUN strip -s /app/nim_censor_bot && \ + strip -R .comment -R .note -R .note.ABI-tag /app/nim_censor_bot + FROM scratch COPY --from=builder /app/nim_censor_bot /