mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-22 04:23:07 +00:00
Enable lto, strip symbols via cargo.toml (#2512)
This commit is contained in:
parent
9ac13a0891
commit
276a8c2bd3
4 changed files with 6 additions and 9 deletions
|
@ -11,7 +11,13 @@ rust-version = "1.57"
|
|||
[lib]
|
||||
doctest = false
|
||||
|
||||
[profile.release]
|
||||
strip = "symbols"
|
||||
debug = 0
|
||||
lto = "thin"
|
||||
|
||||
[profile.dev]
|
||||
strip = "symbols"
|
||||
debug = 0
|
||||
|
||||
[features]
|
||||
|
|
|
@ -29,9 +29,6 @@ COPY . .
|
|||
RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
|
||||
RUN cargo build --target ${CARGO_BUILD_TARGET}
|
||||
|
||||
# reduce binary size
|
||||
RUN strip ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server
|
||||
|
||||
RUN cp ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server /app/lemmy_server
|
||||
|
||||
# The alpine runner
|
||||
|
|
|
@ -11,9 +11,6 @@ COPY ./ ./
|
|||
RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
|
||||
RUN cargo build --release
|
||||
|
||||
# reduce binary size
|
||||
RUN strip ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server
|
||||
|
||||
RUN cp ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server /app/lemmy_server
|
||||
|
||||
# The alpine runner
|
||||
|
|
|
@ -15,9 +15,6 @@ RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/
|
|||
|
||||
RUN cargo build --release
|
||||
|
||||
# reduce binary size
|
||||
RUN strip ./target/release/lemmy_server
|
||||
|
||||
RUN cp ./target/release/lemmy_server /app/lemmy_server
|
||||
|
||||
# The Debian runner
|
||||
|
|
Loading…
Reference in a new issue