Adjust how native static libraries are linked#40504
Adjust how native static libraries are linked#40504retep998 wants to merge 1 commit intorust-lang:masterfrom
Conversation
There was a problem hiding this comment.
Any reason for the collect?
There was a problem hiding this comment.
Not really, so I removed it.
|
Hmmmm, it looks like linking the whole staticlib is still necessary for librustc_llvm. |
|
Oh right, I don't think we past a list of symbols when creating dylibs on Unix platforms (only on Windows). For cdylibs I think we past the list on all platforms. |
|
Any reason to not always use an explicit export list? Are there linkers that do not support them? |
|
Unsure, if we can get it to work then we can get it to work. Very little of |
|
ping @retep998, any update on this? |
|
#40805 does the changes to hinting in a way which I think is better. It doesn't however attempt to switch from whole_staticlib to simply staticlib, so I'll investigate whether it is possible to use an explicit export list for dylibs everywhere. |
|
Ok, in the meantime I'm going to close this, but we can reopen/resubmit when tests are passing |
Switch from
link_whole_staticlibtolink_staticlibbecause we now pass explicit lists of what to export to the linker on all platforms so theoretically it should work.Ensure that
hint_staticis used appropriately for all static libraries, includingstatic-nobundle, not juststatic.r? @alexcrichton
cc @vadimcn