-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Make a new attribute for the #[link_name = ""] special case #1296
Comments
I'd like to try this. Would #[link_name = ""] still be acceptable, or should it result in an error? |
My opinion is that #[link_name = ""] should go away. |
In that case yes, it would have to be an error. |
OK, I implemented #[nolink](except for making #[link_name=""] an error), then updated the tests to use #[nolink], and got green lights under "make check." But when I try to update the stdlib (say, std::linux_os), it adds a "-llibc" flag, and fails. If I understand correctly, this is because "make check" builds libruststd.so before building my updated rustc. Should I just leave the stdlib alone? Will your staged compilers eventually learn how to do #[nolink], and then you'd update the stdlib? Or, how can I build a stage N rustc without first building the stage N stdlib? |
Probably the way to do this is use both #[link_name = ""] and #[nolink] in std (and core possibly?) with a FIXME to remove link_name later. Then we'll snapshot the compiler that knows about #[nolink], remove link_name, then make #[link_name = ""] an error. |
Good idea. OK, let me prepare a pull request. |
Pull request sent. |
[link_name = ""] is used to tell rustc not to issue the -L linker flag. This is a special case of the link_name flag so let's replace it with its own attribute, like #[nolink].
The text was updated successfully, but these errors were encountered: