Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Figure out why profile override causes linker errors. #32

Closed
ehuss opened this issue Sep 6, 2019 · 3 comments
Closed

Figure out why profile override causes linker errors. #32

ehuss opened this issue Sep 6, 2019 · 3 comments
Labels
implementation Implementation exploration and tracking issues

Comments

@ehuss
Copy link
Contributor

ehuss commented Sep 6, 2019

The following override causes a linker error:

[profile.dev.overrides.std]
opt-level = 2

Whereas an override like [profile.dev.overrides."*"] works fine. Here is a gist of the error: https://gist.github.com/ehuss/6973e2fad5663f10592f71de08b3eff0

I haven't investigated much, but this seems like a worrisome problem. Perhaps there is a simple explanation, but it may make profile overrides much more difficult to use, and we may want to make it easier if there is some workaround.

Maybe it has something to do with monomorphization of std code happens in the caller, or module re-exports?

@ehuss ehuss added the implementation Implementation exploration and tracking issues label Sep 6, 2019
@alexcrichton
Copy link
Member

Ok so this is strange. I am able to reproduce this on OSX and MSVC, but not on Linux. Additionally the linker error happens building libstd.so, not the final binary.

While this would just happen to get fixed if we drop the dylib crate type for libstd, I'd prefer to dig in more to figure out what's going on.

@alexcrichton
Copy link
Member

Reduced!

What do you think of closing in favor of the usptream issue?

@alexcrichton
Copy link
Member

I'm gonna close this since we did indeed figure it out (rust-lang/rust#64319) and a fix is in progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementation Implementation exploration and tracking issues
Projects
None yet
Development

No branches or pull requests

2 participants