Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

lld 9.0 appears to be optimizing out ctor #43

Closed
jaynus opened this issue Feb 13, 2020 · 4 comments
Closed

lld 9.0 appears to be optimizing out ctor #43

jaynus opened this issue Feb 13, 2020 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jaynus
Copy link

jaynus commented Feb 13, 2020

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.

@mmastrac
Copy link
Owner

This sounds a bit like #27

@jaynus
Copy link
Author

jaynus commented Feb 13, 2020

I should clarify; in my case, these are 2 seperate module files in the same crate

@mmastrac mmastrac added bug Something isn't working help wanted Extra attention is needed labels Apr 23, 2020
@mmastrac
Copy link
Owner

mmastrac commented Sep 1, 2021

Is this still an issue these days?

@mmastrac
Copy link
Owner

Closing for now -- #280 may have a solution for +nightly users.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants