I have a crate with the following in Cargo.toml:
[lib]
crate_type = ["staticlib", "rlib"]
[profile.release]
lto = true
The static library it produces is around 4.4mb.
If remove rlib:
[lib]
crate_type = ["staticlib"]
[profile.release]
lto = true
The static library is around 1.3 mb.
It seems like building both an rlib and a static lib overrides profile.release? Or at least lto?
I'm trying to build both a static lib and an rlib because I want to build both a static library and a binary for the crate and the binary depends on the library.
I have a crate with the following in Cargo.toml:
The static library it produces is around 4.4mb.
If remove rlib:
The static library is around 1.3 mb.
It seems like building both an rlib and a static lib overrides profile.release? Or at least lto?
I'm trying to build both a static lib and an rlib because I want to build both a static library and a binary for the crate and the binary depends on the library.