Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

set lto=on when calling cargo #475

Open
r10s opened this issue Jul 28, 2020 · 2 comments
Open

set lto=on when calling cargo #475

r10s opened this issue Jul 28, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@r10s
Copy link
Member

r10s commented Jul 28, 2020

in deltachat-core-rust, lto is no longer set, however it is possible to set that bit using RUSTFLAGS, see
see deltachat/deltachat-android#1512 and deltachat/deltachat-ios#885 for details.

@Simon-Laux Simon-Laux transferred this issue from deltachat/deltachat-desktop Jul 28, 2020
@Simon-Laux
Copy link
Member

LTO via rustflags seems to be something different than when specifing lto=true inside of deltachat-core's cargo.toml.
It throws an error when using it with rustflags (atleast on macOS and linux).

to reproduce the error:

RUSTFLAGS="-C lto=on -C embed-bitcode=yes" cargo build --release --features vendored -p deltachat_ffi

@Simon-Laux Simon-Laux added the help wanted Extra attention is needed label Jul 28, 2020
@r10s r10s changed the title set lto=true when calling cargo set lto=on when calling cargo Jul 29, 2020
@link2xt
Copy link
Contributor

link2xt commented Feb 27, 2022

Linking is done by node-gyp against libdeltachat.a, this is where LTO should be enabled. For cargo LTO is already enabled in release profile, but it does not matter because cargo does not start the linker.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants