-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Don't export upstream monomorphizations from compiler-builtins #150182
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
base: main
Are you sure you want to change the base?
Conversation
7bfc464 to
368b2ef
Compare
|
r? bjorn3 |
|
rustbot has assigned @JonathanBrouwer. Use |
|
🤨 r? bjorn3 |
|
Requested reviewer is already assigned to this pull request. Please choose another assignee. |
|
Patched it in and built a toolchain so I could test it on my Mac, and as far as I can tell this does fix the problem. Thanks for a quick fix! |
| // https://github.com/rust-lang/rust/issues/150173 | ||
| if tcx.is_compiler_builtins(cnum) { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively could we avoid returning anything from exported_generic_symbols when building compiler-builtins? All symbols in compiler-builtins have hidden visibility and as such we don't tell the linker to export them either.
Also does this PR mean the special case at
rust/compiler/rustc_middle/src/ty/instance.rs
Lines 222 to 225 in 838a912
| // compiler_builtins cannot use upstream monomorphizations. | |
| if tcx.is_compiler_builtins(LOCAL_CRATE) { | |
| return None; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively could we avoid returning anything from exported_generic_symbols when building compiler-builtins?
This occurred to me as well as I was falling asleep. I'll try it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also does this PR mean the special case at
I don't think that special case can be removed, because that is supposed to block compiler-builtins from calling into a monomorphization exported by core.
368b2ef to
44a9d84
Compare
No description provided.