Skip to content

Conversation

@weihanglo
Copy link
Member

@weihanglo weihanglo commented Jan 10, 2026

What does this PR try to resolve?

This reverts #16489
though currently only compiler_builtins has link metadata

-Zany-build-script-metadata is not supported yet for build-std

How to test and review this PR?

Test passes.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 10, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2026

r? @ehuss

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

@epage
Copy link
Contributor

epage commented Jan 10, 2026

I can understand adding a regression test for the panic but by adding a test that we aren't passing up metadata, we are saying it isn't supported which is the question at hand.

Only metadata for direct deps are exposed. Opaque dependencies should be able to pass this information up.

@rustbot rustbot added the A-build-scripts Area: build.rs scripts label Jan 10, 2026
@weihanglo weihanglo changed the title test(build-std): regression test for #16489 fix(build-std): std link metadata propagate to user Jan 10, 2026
@weihanglo
Copy link
Member Author

Thanks. That is reasonable. The link metadata behavior is restore, and for any metadata that leaves for follow-up.

@@ -0,0 +1,3 @@
fn main() {
println!("cargo:compiler-rt=foo");
Copy link
Contributor

Choose a reason for hiding this comment

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

There a reason you are using the old syntax instead of cargo::compiler-rt=foo? I at first thought this was some existing directive :)

Copy link
Member Author

Choose a reason for hiding this comment

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

reflecting how std does it

https://github.com/rust-lang/rust/blob/137716908d561bfcf0341701ec13a28326926c82/library/compiler-builtins/compiler-builtins/build.rs#L19

Updated to new cargo::metadata syntax. It shouldn't affect the test behavior.

Copy link
Contributor

@epage epage left a comment

Choose a reason for hiding this comment

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

Feel free to merge with however you resolve my comment

View changes since this review

This reverts rust-lang#16489
though currently only compiler_builtins has link metadata

`-Zany-build-script-metadata` is not supported yet for build-std
@rustbot
Copy link
Collaborator

rustbot commented Jan 12, 2026

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@weihanglo weihanglo added this pull request to the merge queue Jan 12, 2026
Merged via the queue into rust-lang:master with commit 4a930ce Jan 12, 2026
31 checks passed
@weihanglo weihanglo deleted the std branch January 12, 2026 19:10
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-build-scripts Area: build.rs scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants