Skip to content
Snippets Groups Projects
Commit cf4ed969 authored by Gilles Filippini's avatar Gilles Filippini
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 7a128091
No related branches found
No related tags found
No related merge requests found
Pipeline #31594 waiting for manual action
...@@ -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