rust-ctor
rust-ctor copied to clipboard
lld 9.0 appears to be optimizing out ctor
This seems possibly related to dtolnay/inventory#11.
After upgrading to LLVM 9.0.1, it appears my registrations with the inventory
crate, using ctor
, have dissapeared. Reverting back to LLVM 8.0 resolves the issue.
Specifically, it appears if code in the module is not used, ctor does not run. This wasn't previously the case, so appears to be a new optimization cutting out the registrations from unused modules.
This sounds a bit like #27
I should clarify; in my case, these are 2 seperate module files in the same crate
Is this still an issue these days?
Closing for now -- #280 may have a solution for +nightly
users.