Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSplit the /opt:ref,icf arguments to i686-pc-windows-msvc linker #29126
Comments
This comment has been minimized.
This comment has been minimized.
|
Is there an issue for LLD's inability to handle comma-separated arguments in LLVM's bug tracker yet? |
This comment has been minimized.
This comment has been minimized.
|
There is, https://llvm.org/bugs/show_bug.cgi?id=25228. Apparently commas are sparsely documented. |
This comment has been minimized.
This comment has been minimized.
|
Fix for lld accepting comma-separated arguments committed upstream: r250728. |
This comment has been minimized.
This comment has been minimized.
|
@retep998 As of that fix, assuming
Just closing. |
This comment has been minimized.
This comment has been minimized.
|
@alexchandel That looks like you're simply forgetting to link in msvcrt. |
This comment has been minimized.
This comment has been minimized.
|
@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 |
This comment has been minimized.
This comment has been minimized.
|
@alexchandel Are you still using the old VC6 msvcrt? It might not have those specific symbols. |
This comment has been minimized.
This comment has been minimized.
|
@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 |
alexchandel
referenced this issue
Oct 21, 2015
Open
Don't get memcpy, memmove, memcmp, memset, and strlen from msvcrt.dll #29130
huonw
added
O-windows-msvc
A-linkage
labels
Oct 23, 2015
This comment has been minimized.
This comment has been minimized.
9prady9
commented
Nov 25, 2015
|
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 ? |
This comment has been minimized.
This comment has been minimized.
|
@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. |
This comment has been minimized.
This comment has been minimized.
|
@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). |
This comment has been minimized.
This comment has been minimized.
9prady9
commented
Dec 1, 2015
|
@alexchandel Thank you for clarifying. |
This comment has been minimized.
This comment has been minimized.
|
Is this fixed upstream yet? Can we close? cc @retep998 |
brson
added
the
P-low
label
May 4, 2017
This comment has been minimized.
This comment has been minimized.
|
Yes, LLD fixed this. |
alexchandel commentedOct 17, 2015
Currently rustc passes
/opt:ref,icfto the linker for the i686-pc-windows-msvc target, even when-C opt-level=0is explicitly passed. LLD'slink.exeflavor 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.