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
|
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
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -8,6 +8,7 @@ WORKDIR /app
|
||||||
# Build with necessary params to enable statically linking openssl, glibc and sqlite3
|
# Build with necessary params to enable statically linking openssl, glibc and sqlite3
|
||||||
RUN nimble build --passL:-L/usr/lib \
|
RUN nimble build --passL:-L/usr/lib \
|
||||||
-d:ssl \
|
-d:ssl \
|
||||||
|
--cc:clang \
|
||||||
-p:. \
|
-p:. \
|
||||||
--dynlibOverride:ssl \
|
--dynlibOverride:ssl \
|
||||||
--dynlibOverride:crypto \
|
--dynlibOverride:crypto \
|
||||||
|
@ -16,6 +17,7 @@ RUN nimble build --passL:-L/usr/lib \
|
||||||
--passl:-lsqlite3 \
|
--passl:-lsqlite3 \
|
||||||
--passl:-lcrypto \
|
--passl:-lcrypto \
|
||||||
--passL:-static \
|
--passL:-static \
|
||||||
|
--passL:-flto=thin \
|
||||||
-d:release \
|
-d:release \
|
||||||
--opt:speed \
|
--opt:speed \
|
||||||
--accept
|
--accept
|
||||||
|
|
Loading…
Reference in a new issue