Do LTO on the binary
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
c77bc890cb
commit
15dbf2f29d
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
FROM nimlang/nim:alpine as builder
|
||||
|
||||
RUN apk update && apk add git build-base curl bash openssl openssl-dev openssl-libs-static sqlite-dev sqlite-static
|
||||
RUN apk update && apk add git build-base llvm llvm-dev curl bash openssl openssl-dev openssl-libs-static sqlite-dev sqlite-static
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
@ -8,6 +8,7 @@ WORKDIR /app
|
|||
# Build with necessary params to enable statically linking openssl, glibc and sqlite3
|
||||
RUN nimble build --passL:-L/usr/lib \
|
||||
-d:ssl \
|
||||
--cc:clang \
|
||||
-p:. \
|
||||
--dynlibOverride:ssl \
|
||||
--dynlibOverride:crypto \
|
||||
|
@ -16,6 +17,7 @@ RUN nimble build --passL:-L/usr/lib \
|
|||
--passl:-lsqlite3 \
|
||||
--passl:-lcrypto \
|
||||
--passL:-static \
|
||||
--passL:-flto=thin \
|
||||
-d:release \
|
||||
--opt:speed \
|
||||
--accept
|
||||
|
|
Loading…
Reference in a new issue