-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
A-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
https://github.com/rustwasm/rust_wasm_template has
[lib]
crate-type = [
# Build a cdylib to make a `.wasm` library.
"cdylib",
# Build an rlib for testing and benching.
"rlib"
]
[profile.release]
lto = true
The lto = true
is ignored for everything because rlibs don't support LTO. I would expect that the cdylib has LTO and that only the rlib ignores the LTO options.
@alexcrichton tells me this is a rust compiler bug, not a cargo bug.
FWIW, this command does not work either:
cargo rustc -- -C lto=fat --crate-type cdylib
bltavares, kevincox, DarthGandalf, yumios, pepyakin and 6 more
Metadata
Metadata
Assignees
Labels
A-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.