-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Split the /opt:ref,icf arguments to i686-pc-windows-msvc linker #29126
Comments
Is there an issue for LLD's inability to handle comma-separated arguments in LLVM's bug tracker yet? |
There is, https://llvm.org/bugs/show_bug.cgi?id=25228. Apparently commas are sparsely documented. |
Fix for lld accepting comma-separated arguments committed upstream: r250728. |
@retep998 As of that fix, assuming
Just closing. |
@alexchandel That looks like you're simply forgetting to link in msvcrt. |
@retep998 Except these are only math functions. Clearly msvcrt's entry point is present, as are the memory functions. More importantly I'm not calling the linker: Also, this only happens when |
@alexchandel Are you still using the old VC6 msvcrt? It might not have those specific symbols. |
@retep998 That is probably it. It's possible that nextafter is only supported post-VC2010, which is frightening. This lingering issue is a reason to leave msvcrt's math functions for openlibm's though. Also, it would be nice to have just |
Is this issue fixed in nightly(1.6) or beta(1.5) ? Is there any temporary work around for this with 1.4 stable release ? |
@9prady9 rustc still doesn't split the arguments, but LLD's head can handle them now. However, we are still relying on an undocumented feature. The other tangential issue discussed still exists, in that Rust's standard library isn't compatible with VC6's msvcrt, but requires VS 2013's. That could be resolved by rolling our own libm, which also solves many other issues, as proposed in rust-lang/rfcs#711. |
@alexchandel It's not an undocumented feature. The documentation makes use of flags with commas in several places. It just doesn't have any documentation specifically pointing out that you can use commas (or at least I couldn't find any). |
@alexchandel Thank you for clarifying. |
Is this fixed upstream yet? Can we close? cc @retep998 |
Yes, LLD fixed this. |
Currently rustc passes
/opt:ref,icf
to the linker for the i686-pc-windows-msvc target, even when-C opt-level=0
is explicitly passed. LLD'slink.exe
flavor doesn't support comma-separated arguments, and would require/opt:ref /opt:icf
. rustc should pass these separately.Moreover, rustc needs provide a way to stop them from being passed at all, as I explicitly specified zero optimiations, and didn't pass
-C lto
.The text was updated successfully, but these errors were encountered: