Conditionally build wasm-component-ld by alexcrichton · Pull Request #127866 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation13 Commits2 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

alexcrichton

This commit updates the support for the wasm-component-ld tool from #126967 to conditionally build rather than unconditionally building it when LLD is enabled. This support is disabled by default and can be enabled by one of two means:

Neither of these are enabled by default meaning that most local builds will likely not have this new tool built. Dist builders should still, however, build the tool.

@rustbot

r? @onur-ozkan

rustbot has assigned @onur-ozkan.
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

This PR modifies config.example.toml.

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

@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

Jul 17, 2024

@rust-log-analyzer

This comment has been minimized.

@alexcrichton alexcrichton changed the titleConditionally build wasm-component-ld when lld is enabled Conditionally build wasm-component-ld

Jul 17, 2024

onur-ozkan

Choose a reason for hiding this comment

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

LGTM other than a missing change record.

This PR modifies config.example.toml.

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

Please add it in change_tracker module similar to

ChangeInfo {
change_id: 124129,
severity: ChangeSeverity::Warning,
summary: "`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.",
},

.

@alexcrichton

Sure thing, added. I figured this was a pretty niche and small change and it looks like all users get warnings/prints/etc when updating existing checkouts so I didn't want to spam messages, but if it's desired to have an exhaustive changelog I'm happy to add the entry.

@onur-ozkan

Sure thing, added. I figured this was a pretty niche and small change and it looks like all users get warnings/prints/etc when updating existing checkouts so I didn't want to spam messages, but if it's desired to have an exhaustive changelog I'm happy to add the entry.

Thanks, no worries about the spam; records are printed only once (unless the build directory is removed).

@bors r+

@bors

📌 Commit d0777ca has been approved by onur-ozkan

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

Jul 18, 2024

@bors

@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

Jul 19, 2024

@alexcrichton

This commit updates the support for the wasm-component-ld tool from rust-lang#126967 to conditionally build it rather than unconditionally building it when LLD is enabled. This support is disabled by default and can be enabled by one of two means:

Neither of these are enabled by default meaning that most local builds will likely not have this new tool built. Dist builders should still, however, build the tool.

@alexcrichton

@alexcrichton

@onur-ozkan

@bors

📌 Commit f0a2b5b has been approved by onur-ozkan

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

Jul 19, 2024

tgross35 added a commit to tgross35/rust that referenced this pull request

Jul 19, 2024

@tgross35

…t-ld-by-default, r=onur-ozkan

Conditionally build wasm-component-ld

This commit updates the support for the wasm-component-ld tool from rust-lang#126967 to conditionally build rather than unconditionally building it when LLD is enabled. This support is disabled by default and can be enabled by one of two means:

Neither of these are enabled by default meaning that most local builds will likely not have this new tool built. Dist builders should still, however, build the tool.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jul 20, 2024

@bors

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jul 20, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jul 20, 2024

@bors

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jul 20, 2024

@rust-timer

Rollup merge of rust-lang#127866 - alexcrichton:disable-wasm-component-ld-by-default, r=onur-ozkan

Conditionally build wasm-component-ld

This commit updates the support for the wasm-component-ld tool from rust-lang#126967 to conditionally build rather than unconditionally building it when LLD is enabled. This support is disabled by default and can be enabled by one of two means:

Neither of these are enabled by default meaning that most local builds will likely not have this new tool built. Dist builders should still, however, build the tool.

@xry111

Hmm the condition to build wasm-component-ld seems inconsistent with other tools (cargo etc.). Those tools require both extended=true and tools containing the name to be built, but here wasm-component-ld requires either extended=true or tools containing its name.

IMO we should change it to match other tools (or there's just no way to build another tool without building wasm-component-ld).

alexcrichton added a commit to alexcrichton/rust that referenced this pull request

Sep 6, 2024

@alexcrichton

It was [pointed out recently][comment] that enabling wasm-component-ld as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for wasm-component-ld.

[comment]: rust-lang#127866 (comment)

@alexcrichton

Good catch, and my bad on the mistake! I've tried to fix this in #130034

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Sep 9, 2024

@workingjubilee

…nt-ld-comments, r=onur-ozkan

Fix enabling wasm-component-ld to match other tools

It was [pointed out recently][comment] that enabling wasm-component-ld as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for wasm-component-ld.

While here I also fixed a typo pointed out in rust-lang#126967 (review)

[comment]: rust-lang#127866 (comment)

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Sep 9, 2024

@workingjubilee

…nt-ld-comments, r=onur-ozkan

Fix enabling wasm-component-ld to match other tools

It was [pointed out recently][comment] that enabling wasm-component-ld as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for wasm-component-ld.

While here I also fixed a typo pointed out in rust-lang#126967 (review)

[comment]: rust-lang#127866 (comment)

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Sep 9, 2024

@workingjubilee

…nt-ld-comments, r=onur-ozkan

Fix enabling wasm-component-ld to match other tools

It was [pointed out recently][comment] that enabling wasm-component-ld as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for wasm-component-ld.

While here I also fixed a typo pointed out in rust-lang#126967 (review)

[comment]: rust-lang#127866 (comment)

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Sep 9, 2024

@rust-timer

Rollup merge of rust-lang#130034 - alexcrichton:fix-some-wasm-component-ld-comments, r=onur-ozkan

Fix enabling wasm-component-ld to match other tools

It was [pointed out recently][comment] that enabling wasm-component-ld as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for wasm-component-ld.

While here I also fixed a typo pointed out in rust-lang#126967 (review)

[comment]: rust-lang#127866 (comment)

RalfJung pushed a commit to RalfJung/miri that referenced this pull request

Sep 10, 2024

@workingjubilee

…ments, r=onur-ozkan

Fix enabling wasm-component-ld to match other tools

It was [pointed out recently][comment] that enabling wasm-component-ld as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for wasm-component-ld.

While here I also fixed a typo pointed out in rust-lang/rust#126967 (review)

[comment]: rust-lang/rust#127866 (comment)

shrirambalaji pushed a commit to shrirambalaji/rust that referenced this pull request

Oct 6, 2024

@alexcrichton @shrirambalaji

It was [pointed out recently][comment] that enabling wasm-component-ld as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for wasm-component-ld.

[comment]: rust-lang#127866 (comment)

bherrera pushed a commit to misttech/integration that referenced this pull request

Oct 16, 2024

@copybara-github

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

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)