-
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
Fix linkage for large binaries on mips64 platforms #111772
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
These commits modify compiler targets. |
This comment has been minimized.
This comment has been minimized.
bbaddbc
to
5730d06
Compare
r? compiler |
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.
Is it reasonable to write a test for this? Or is this fact that it only triggers for large binaries make that intractable?
# FIXME: remove this if condition on the next bootstrap bump | ||
# cfg(bootstrap) | ||
if self.build_triple().startswith('mips'): | ||
env["RUSTFLAGS"] += " -Ctarget-feature=+xgot" |
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.
This should ideally have a comment why this exists.
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.
Fixed.
Usually, it will trigger when the external symbol is situated in a location that is not encode-able into an |
5730d06
to
4a431dd
Compare
* Targets MIPS III * Use xgot linkage (see rust-lang/rust#111772)
... by enabling xgot feature Co-Authored-By: Zixing Liu <zixing.liu@canonical.com>
4a431dd
to
b65c2af
Compare
@bors r+ |
…jackh726 Fix linkage for large binaries on mips64 platforms This pull request fixes the linkage for large binaries on mips64 platforms by enabling the `xgot` feature in LLVM. It is well understood that the generated binary will gain a hefty performance penalty where the external symbol jumps now cost at least three instructions each. Also, this pull request does not address the same issue on the mips32 counterparts (due to being unable to test the changes thoroughly). Should fix rust-lang#52108
…jackh726 Fix linkage for large binaries on mips64 platforms This pull request fixes the linkage for large binaries on mips64 platforms by enabling the `xgot` feature in LLVM. It is well understood that the generated binary will gain a hefty performance penalty where the external symbol jumps now cost at least three instructions each. Also, this pull request does not address the same issue on the mips32 counterparts (due to being unable to test the changes thoroughly). Should fix rust-lang#52108
…jackh726 Fix linkage for large binaries on mips64 platforms This pull request fixes the linkage for large binaries on mips64 platforms by enabling the `xgot` feature in LLVM. It is well understood that the generated binary will gain a hefty performance penalty where the external symbol jumps now cost at least three instructions each. Also, this pull request does not address the same issue on the mips32 counterparts (due to being unable to test the changes thoroughly). Should fix rust-lang#52108
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#111772 (Fix linkage for large binaries on mips64 platforms) - rust-lang#111975 (Stop normalizing so many different prefixes) - rust-lang#111979 (Respect CARGOFLAGS in bootstrap.py) - rust-lang#112089 (Add `--warnings warn` flag to `x.py`) - rust-lang#112103 (Bootstrap update to 1.71 beta) r? `@ghost` `@rustbot` modify labels: rollup
This pull request fixes the linkage for large binaries on mips64 platforms by enabling the
xgot
feature in LLVM.It is well understood that the generated binary will gain a hefty performance penalty where the external symbol jumps now cost at least three instructions each.
Also, this pull request does not address the same issue on the mips32 counterparts (due to being unable to test the changes thoroughly).
Should fix #52108