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

ignore llvm::Lld if lld is not enabled #126701

Merged
merged 6 commits into from
Jun 28, 2024

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Jun 19, 2024

People are having trouble (ref. zulip thread) when they don't want to build lld for their custom distribution tarballs even with lld = false in their config.toml. This is because it is not controlled by lld_enabled flag. This change ensures that llvm:Lld is controlled by lld configuration.

Additionally, lld = true is set by default for dist profile, because we have been building it all along and this maintains that behavior.

try-job: x86_64-mingw

People are having trouble when they don't want to build `lld` for their custom
distribution tarballs even with `lld = false` in their config.toml. This is because
it is not controlled by `lld_enabled` flag. This change ensures that `llvm:Lld`
is controlled by lld configuration.

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

rustbot commented Jun 19, 2024

r? @clubby789

rustbot has assigned @clubby789.
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 Jun 19, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2024

This PR modifies src/bootstrap/defaults.

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

@onur-ozkan
Copy link
Member Author

This PR modifies src/bootstrap/defaults.

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

src/bootstrap/defaults/config.dist.toml was updated to avoid a breaking change, so there is nothing to add to the change tracker.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 19, 2024
@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Contributor

Kobzol commented Jun 27, 2024

r? @Kobzol

@rustbot rustbot assigned Kobzol and unassigned clubby789 Jun 27, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Jun 27, 2024

This is a good cleanup, it should be possible to turn packaging of lld off. Let's do a try build just to check that the lld component stays there.

@bors try

@bors
Copy link
Contributor

bors commented Jun 27, 2024

⌛ Trying commit bfca652 with merge b5e90df...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 27, 2024
…try>

ignore `llvm::Lld` if lld is not enabled

People are having trouble ([ref. zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/MSVC.20Runtime.20mismatch.20when.20building.20LLD)) when they don't want to build `lld` for their custom distribution tarballs even with `lld = false` in their config.toml. This is because it is not controlled by `lld_enabled` flag. This change ensures that `llvm:Lld` is controlled by lld configuration.

Additionally, `lld = true` is set by default for dist profile, because we have been building it all along and this maintains that behavior.
@bors
Copy link
Contributor

bors commented Jun 27, 2024

☀️ Try build successful - checks-actions
Build commit: b5e90df (b5e90df655dfa6cc794cb3eaa8452acc9f64fb25)

@Kobzol
Copy link
Contributor

Kobzol commented Jun 27, 2024

Good, lld seems to be there!

One more thing, maybe we should add an entry to config tracker? Maybe some people who do their own dist would be interested in the changed default (they might have overridden lld before or they don't use the dist default profile).

@Kobzol
Copy link
Contributor

Kobzol commented Jun 27, 2024

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 27, 2024

📌 Commit b1b473e has been approved by Kobzol

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 Jun 27, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 28, 2024
…=Kobzol

ignore `llvm::Lld` if lld is not enabled

People are having trouble ([ref. zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/MSVC.20Runtime.20mismatch.20when.20building.20LLD)) when they don't want to build `lld` for their custom distribution tarballs even with `lld = false` in their config.toml. This is because it is not controlled by `lld_enabled` flag. This change ensures that `llvm:Lld` is controlled by lld configuration.

Additionally, `lld = true` is set by default for dist profile, because we have been building it all along and this maintains that behavior.
@lqd
Copy link
Member

lqd commented Jun 28, 2024

Ah so likely yet another case of rust-lld was only enabled on some dist builders and no test builder.

Probably something like that directive yes, or maybe even more precise à la x86_64-pc-windows-msvc, as IIUC there are a bunch of other msvc targets that may not have rust-lld support (or where it's distributed though I guess needs-rust-lld will take care of that). But I know nothing about windows and this may need the eyes of e.g. Chris Denton.

That is, if the test actually still passes and hasn't regressed since it was written :/ Maybe you can try it on x64 msvc and it it fails ping Chris the expert?

@Kobzol
Copy link
Contributor

Kobzol commented Jun 28, 2024

The test has succeeded on x86_64-msvc in the previous merge attempt. So probably we just need to modify the compiletest flag.

@lqd
Copy link
Member

lqd commented Jun 28, 2024

great then //@ only-x86_64-pc-windows-msvc and we're good

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

Testing 17b843b

@bors try

@bors
Copy link
Contributor

bors commented Jun 28, 2024

⌛ Trying commit 17b843b with merge 08efb2e...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 28, 2024
…try>

ignore `llvm::Lld` if lld is not enabled

People are having trouble ([ref. zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/MSVC.20Runtime.20mismatch.20when.20building.20LLD)) when they don't want to build `lld` for their custom distribution tarballs even with `lld = false` in their config.toml. This is because it is not controlled by `lld_enabled` flag. This change ensures that `llvm:Lld` is controlled by lld configuration.

Additionally, `lld = true` is set by default for dist profile, because we have been building it all along and this maintains that behavior.

try-job: x86_64-mingw
@bors
Copy link
Contributor

bors commented Jun 28, 2024

☀️ Try build successful - checks-actions
Build commit: 08efb2e (08efb2e4d2982a6d0095dcad7e83f33675b32a86)

@Kobzol
Copy link
Contributor

Kobzol commented Jun 28, 2024

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Jun 28, 2024

📌 Commit 17b843b has been approved by Kobzol

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 Jun 28, 2024
@onur-ozkan
Copy link
Member Author

@bors r=Kobzol

@bors
Copy link
Contributor

bors commented Jun 28, 2024

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Jun 28, 2024

📌 Commit 17b843b has been approved by Kobzol

It is now in the queue for this repository.

@onur-ozkan
Copy link
Member Author

@bors r+ rollup=never

oops, didn't see that

@bors
Copy link
Contributor

bors commented Jun 28, 2024

⌛ Testing commit 17b843b with merge e9e6e2e...

@bors
Copy link
Contributor

bors commented Jun 28, 2024

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing e9e6e2e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 28, 2024
@bors bors merged commit e9e6e2e into rust-lang:master Jun 28, 2024
1 check passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 28, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e9e6e2e): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-1.9% [-1.9%, -1.9%] 1
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 1

Max RSS (memory usage)

Results (primary -3.1%, secondary -5.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.1% [-3.8%, -2.4%] 2
Improvements ✅
(secondary)
-5.2% [-6.4%, -3.7%] 3
All ❌✅ (primary) -3.1% [-3.8%, -2.4%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 696.756s -> 694.621s (-0.31%)
Artifact size: 326.69 MiB -> 324.60 MiB (-0.64%)

@onur-ozkan onur-ozkan deleted the build-lld-if-enabled branch June 29, 2024 05:48
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 29, 2024
Add a run-make test that LLD is not being used by default on the x64 beta/stable channel

rust-lang#126701 showed that the handling of `lld` in bootstrap is currently not ideal. While it would be nice to refactor it eventually, we should also make sure that we have a test that checks that `lld` is not used (yet!) by default on the x64 Linux stable channel.

CC `@lqd`

r? `@onur-ozkan`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 29, 2024
Add a run-make test that LLD is not being used by default on the x64 beta/stable channel

rust-lang#126701 showed that the handling of `lld` in bootstrap is currently not ideal. While it would be nice to refactor it eventually, we should also make sure that we have a test that checks that `lld` is not used (yet!) by default on the x64 Linux stable channel.

CC ``@lqd``

r? ``@onur-ozkan``
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 30, 2024
Rollup merge of rust-lang#127081 - Kobzol:lld-test, r=onur-ozkan

Add a run-make test that LLD is not being used by default on the x64 beta/stable channel

rust-lang#126701 showed that the handling of `lld` in bootstrap is currently not ideal. While it would be nice to refactor it eventually, we should also make sure that we have a test that checks that `lld` is not used (yet!) by default on the x64 Linux stable channel.

CC ``@lqd``

r? ``@onur-ozkan``
bherrera pushed a commit to misttech/integration that referenced this pull request Oct 16, 2024
Here are all the changes. I went through them one-by-one and confirmed
that they should not be affecting us. In paritcular, we explicitly set
rust.lld = false (because we want to use the lld that ships with clang),
so the change in default does not affect us.

There have been changes to x.py since you last updated:
  [INFO] New option `build.lldb` that will override the default lldb binary path used in debuginfo tests
    - PR Link rust-lang/rust#124501
  [INFO] The compiler profile now defaults to rust.debuginfo-level = "line-tables-only"
    - PR Link rust-lang/rust#123337
  [WARNING] `rust.lld` has a new default value of `true` on `x86_64-unknown-linux-gnu`. Starting at stage1, `rust-lld` will thus be this target's default linker. No config changes should be necessary.
    - PR Link rust-lang/rust#124129
  [WARNING] Removed `dist.missing-tools` configuration as it was deprecated long time ago.
    - PR Link rust-lang/rust#125535
  [WARNING] `llvm.lld` is enabled by default for the dist profile. If set to false, `lld` will not be included in the dist build.
    - PR Link rust-lang/rust#126701
  [WARNING] `debug-logging` option has been removed from the default `tools` profile.
    - PR Link rust-lang/rust#127913
  [INFO] the `wasm-component-ld` tool is now built as part of `build.extended` and can be a member of `build.tools`
    - PR Link rust-lang/rust#127866
  [INFO] Removed android-ndk r25b support in favor of android-ndk r26d.
    - PR Link rust-lang/rust#120593
  [WARNING] For tarball sources, default value for `rust.channel` will be taken from `src/ci/channel` file.
    - PR Link rust-lang/rust#125181
  [INFO] New option `llvm.libzstd` to control whether llvm is built with zstd support.
    - PR Link rust-lang/rust#125642
  [WARNING] ./x test --rustc-args was renamed to --compiletest-rustc-args as it only applies there. ./x miri --rustc-args was also removed.
    - PR Link rust-lang/rust#128841
  [INFO] The `build.profiler` option now tries to use source code from `download-ci-llvm` if possible, instead of checking out the `src/llvm-project` submodule.
    - PR Link rust-lang/rust#129295

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/1120078
Original-Revision: 27df37a30e50b14b9ffefc872b6997790f03d4ea
GitOrigin-RevId: 341e222f002e36886b9960645b21faeaed633f90
Change-Id: Id1eb54a677a6f538bf7666d65b85d5fdba17ea42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

10 participants