Skip to content

support target specific optimized-compiler-builtins #135326

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

Merged
merged 5 commits into from
Jan 11, 2025

Conversation

onur-ozkan
Copy link
Member

Makes it possible to control optimized-compiler-builtins for per target.

This was raised in the zulip discussion yesterday.

@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2025

This PR modifies config.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jieyouxu
Copy link
Member

ferrisCatRPlusRollup-200px

@bors
Copy link
Collaborator

bors commented Jan 10, 2025

📌 Commit 5a19c26 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 10, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 11, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#134074 (bootstrap: `std::io::ErrorKind::CrossesDevices` is finally stable)
 - rust-lang#135236 (Update a bunch of library types for MCP807)
 - rust-lang#135301 (re-add a warning for old master branch, but with much simpler logic)
 - rust-lang#135324 (Initial fs module for uefi)
 - rust-lang#135326 (support target specific `optimized-compiler-builtins`)
 - rust-lang#135347 (Use `NonNull::without_provenance` within the standard library)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 538d5dc into rust-lang:master Jan 11, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 11, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 11, 2025
Rollup merge of rust-lang#135326 - onur-ozkan:target-specific-compiler-builtins, r=jieyouxu

support target specific `optimized-compiler-builtins`

Makes it possible to control `optimized-compiler-builtins` for per target.

This was raised in the [zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Building.20and.20packaging.20Rust.20with.20x86_64-unknown-uefi.20support/near/492765883) yesterday.
@onur-ozkan onur-ozkan deleted the target-specific-compiler-builtins branch January 11, 2025 12:25
algitbot pushed a commit to alpinelinux/aports that referenced this pull request Apr 27, 2025
Enable support for compiling for UEFI targets. This includes compiling
binaries such as bootloaders, stubs for EFI bundles and similar utilities.

Specifically, I used this functionality to finish work a minimal EFI
stub, candyboot: https://git.sr.ht/~whynothugo/candyboot

The UEFI target is only supported by LLVM. GCC cannot produce native EFI
binaries. When compiling for a UEFI target, GCC produces ELF binaries
and uses GNU-EFI as a stub loader to run them inside EFI environments.
This approach does not work when compiling Rust.

The profiler_builtins crate fails to build for the UEFI target; it is a
C component which requires a UEFI specific sysroot to compile. During
coordination with upstream, it came up these compiler built-ins could
not be disabled on a per-target basis. This is now implemented upstream,
and available in Rust stable since 1.86.0.

See: rust-lang/rust#135326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants