Skip to content
Snippets Groups Projects
Commit 59111f8f authored by Gilles Filippini's avatar Gilles Filippini Committed by Hugo Trentesaux
Browse files

build: LTO profile 'thin' and moved to Cargo.toml

It makes more sense to set the release LTO profile into the related
Cargo.toml section than into the Dockerfile only.

Using LTO 'thin' profile because according to the documentation it is
a good compromise with no or little performance loss.
parent 10170f2a
No related branches found
No related tags found
1 merge request!160build: LTO profile 'thin' and moved to Cargo.toml
Pipeline #31599 failed
...@@ -205,6 +205,7 @@ yamux = { opt-level = 3 } ...@@ -205,6 +205,7 @@ yamux = { opt-level = 3 }
zeroize = { opt-level = 3 } zeroize = { opt-level = 3 }
[profile.release] [profile.release]
lto = "thin"
# Substrate runtime requires unwinding. # Substrate runtime requires unwinding.
panic = "unwind" panic = "unwind"
......
...@@ -21,8 +21,7 @@ RUN test -x build/duniter || \ ...@@ -21,8 +21,7 @@ RUN test -x build/duniter || \
ARG threads=1 ARG threads=1
RUN test -x build/duniter || \ RUN test -x build/duniter || \
( \ ( \
CARGO_PROFILE_RELEASE_LTO="true" \ cargo build --release -j $threads && \
cargo build --release -j $threads && \
mkdir -p build && \ mkdir -p build && \
mv target/release/duniter build/ \ mv target/release/duniter build/ \
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment