Skip to content
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

improve host/cross target checking #136767

Merged
merged 3 commits into from
Feb 12, 2025
Merged

Conversation

onur-ozkan
Copy link
Member

Using an invalid equality operator on builder.config.build !=/== can be hard to detect in reviews (which is quite dangerous). Replaced them with is_host_target, which is much clearer as it explicitly states what it does.

@rustbot
Copy link
Collaborator

rustbot commented Feb 9, 2025

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
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 A-testsuite Area: The testsuite used to check the correctness of rustc 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 Feb 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 9, 2025

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

Copy link
Member

@albertlarsan68 albertlarsan68 left a comment

Choose a reason for hiding this comment

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

LGTM, r=me when CI green :)

@albertlarsan68
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 9, 2025

📌 Commit 5a8ac04 has been approved by albertlarsan68

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 Feb 9, 2025
src/bootstrap/src/lib.rs Outdated Show resolved Hide resolved
@jieyouxu
Copy link
Member

jieyouxu commented Feb 9, 2025

Sorry, it's entirely possible that I am confused, but I have a naming question
@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 9, 2025
@onur-ozkan
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 10, 2025
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

@bors r=albertlarsan68,jieyouxu

@bors
Copy link
Contributor

bors commented Feb 10, 2025

📌 Commit c3856e9 has been approved by albertlarsan68,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 Feb 10, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 10, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#136419 (adding autodiff tests)
 - rust-lang#136628 (ci: upgrade to crosstool-ng 1.27.0)
 - rust-lang#136681 (resolve `llvm-config` path properly on cross builds)
 - rust-lang#136714 (Update `compiler-builtins` to 0.1.146)
 - rust-lang#136731 (rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync")
 - rust-lang#136791 (Disable DWARF in linker options for i686-unknown-uefi)

Failed merges:

 - rust-lang#136767 (improve host/cross target checking)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 10, 2025
…tlarsan68,jieyouxu

improve host/cross target checking

Using an invalid equality operator on `builder.config.build !=/==` can be hard to detect in reviews (which is quite dangerous). Replaced them with `is_host_target`, which is much clearer as it explicitly states what it does.
@workingjubilee
Copy link
Member

needs rebase
@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 10, 2025
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan
Copy link
Member Author

Rebased.

@bors r=albertlarsan68,jieyouxu

@bors
Copy link
Contributor

bors commented Feb 11, 2025

📌 Commit cba9ddd has been approved by albertlarsan68,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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 11, 2025
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan
Copy link
Member Author

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#21 exporting to docker image format
#21 sending tarball 28.0s done
#21 DONE 41.4s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
  Downloaded boml v0.3.1
   Compiling boml v0.3.1
   Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
    Finished `release` profile [optimized] target(s) in 3.95s
     Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-system-gcc --use-backend gcc --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --mini-tests --std-tests`
Using system GCC
warning: target feature `x87` must be enabled to ensure that the ABI of the current target can be implemented correctly
  |
  = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344>

Wtf is this.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 11, 2025
@jieyouxu

This comment was marked as resolved.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan
Copy link
Member Author

Unrelated, it's because -D warnings:

2025-02-11T14:24:06.0541945Z �[0m�[1m�[38;5;9merror�[0m�[0m�[1m: function `test_is_builder_target` is never used�[0m
2025-02-11T14:24:06.0542802Z �[0m    �[0m�[0m�[1m�[38;5;12m--> �[0m�[0msrc/bootstrap/src/core/builder/tests.rs:1069:4�[0m
2025-02-11T14:24:06.0543322Z �[0m     �[0m�[0m�[1m�[38;5;12m|�[0m
2025-02-11T14:24:06.0543860Z �[0m�[1m�[38;5;12m1069�[0m�[0m �[0m�[0m�[1m�[38;5;12m|�[0m�[0m �[0m�[0mfn test_is_builder_target() {�[0m
2025-02-11T14:24:06.0544477Z �[0m     �[0m�[0m�[1m�[38;5;12m|�[0m�[0m    �[0m�[0m�[1m�[38;5;9m^^^^^^^^^^^^^^^^^^^^^^�[0m
2025-02-11T14:24:06.0544910Z �[0m     �[0m�[0m�[1m�[38;5;12m|�[0m
2025-02-11T14:24:06.0545784Z �[0m     �[0m�[0m�[1m�[38;5;12m= �[0m�[0m�[1mnote�[0m�[0m: `-D dead-code` implied by `-D warnings`�[0m
2025-02-11T14:24:06.0546506Z �[0m     �[0m�[0m�[1m�[38;5;12m= �[0m�[0m�[1mhelp�[0m�[0m: to override `-D warnings` add `#[allow(dead_code)]`�[0m

I missed #[test] during the rebase lol.

@onur-ozkan
Copy link
Member Author

@bors r=albertlarsan68,jieyouxu

@bors
Copy link
Contributor

bors commented Feb 11, 2025

📌 Commit acc7ddf has been approved by albertlarsan68,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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 11, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 12, 2025
…tlarsan68,jieyouxu

improve host/cross target checking

Using an invalid equality operator on `builder.config.build !=/==` can be hard to detect in reviews (which is quite dangerous). Replaced them with `is_host_target`, which is much clearer as it explicitly states what it does.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2025
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#134981 ( Explain that in paths generics can't be set on both the enum and the variant)
 - rust-lang#136698 (Replace i686-unknown-redox target with i586-unknown-redox)
 - rust-lang#136767 (improve host/cross target checking)
 - rust-lang#136829 ([rustdoc] Move line numbers into the `<code>` directly)
 - rust-lang#136875 (Rustc dev guide subtree update)
 - rust-lang#136900 (compiler: replace `ExternAbi::name` calls with formatters)
 - rust-lang#136913 (Put kobzol back on review rotation)
 - rust-lang#136915 (documentation fix: `f16` and `f128` are not double-precision)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1073aea into rust-lang:master Feb 12, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 12, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2025
Rollup merge of rust-lang#136767 - onur-ozkan:is-host-target, r=albertlarsan68,jieyouxu

improve host/cross target checking

Using an invalid equality operator on `builder.config.build !=/==` can be hard to detect in reviews (which is quite dangerous). Replaced them with `is_host_target`, which is much clearer as it explicitly states what it does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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.

7 participants