Visitar URL original
Treat all proc macro dependencies as host dependencies in bootstrap by Kobzol · Pull Request #165641 · rust-lang/rust · GitHub
Skip to content

Treat all proc macro dependencies as host dependencies in bootstrap - #165641

Open
Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:proc-macros-deps
Open

Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:proc-macros-deps

Conversation

@Kobzol

@Kobzol Kobzol commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

View all comments

I think that the name Host was not fully accurate, and we were only adding proc macros as Host deps anyway. This PR renames Host to ProcMacro, and records all proc macro dependencies produced by cargo in bootstrap builds. So even if you cross-compile from T1 to T2, and you build proc macros for both T1 and T2, we will now record also proc macros for T2 to be Host/ProcMacro dependencies. So they should be correctly filtered when assembling the toolchain.

Kinda hard to tell if this won't break anything, but at least when cross-compiling compiler and library, the deps looked reasonable to me.

Fixes: #165478

@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 Nov 8, 2026
@rustbot

rustbot commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@Kobzol

Kobzol commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

@bors try jobs=dist-x86_64-linux,dist-s390x-linux

rust-bors Bot pushed a commit that referenced this pull request Nov 8, 2026
Treat all proc macro dependencies as host dependencies in bootstrap


try-job: dist-x86_64-linux
try-job: dist-s390x-linux
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bjorn3

bjorn3 commented Nov 8, 2026

Copy link
Copy Markdown
Member

I think this causes the target proc-macros to be omitted from rustc-dev, breaking rustc-dev.

@rust-bors rust-bors Bot 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-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2026
@rust-bors

rust-bors Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 281011f failed: CI. Failed job:

@Kobzol

Kobzol commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

@bors try jobs=dist-x86_64-linux,dist-s390x-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 9, 2026
Treat all proc macro dependencies as host dependencies in bootstrap


try-job: dist-x86_64-linux
try-job: dist-s390x-linux
@rust-bors

rust-bors Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 54ebbd7 (54ebbd7a7f69c528472653a7eeb80ac3d83ea368)
Base parent: 4de0e38 (4de0e38612353dc524009a12ad43f0c05a5f8c6e)

@Kobzol

Kobzol commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

@rust-timer build=54ebbd7a7f69c528472653a7eeb80ac3d83ea368

@rust-timer

Copy link
Copy Markdown
Collaborator

Unknown rust-timer command: build=54ebbd7a7f69c528472653a7eeb80ac3d83ea368

@Kobzol

Kobzol commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

@rust-timer build 54ebbd7

@rust-timer

Copy link
Copy Markdown
Collaborator

Missing artifact for sha 54ebbd7a7f69c528472653a7eeb80ac3d83ea368 (https://ci-artifacts.rust-lang.org/rustc-builds/54ebbd7a7f69c528472653a7eeb80ac3d83ea368/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz); not built yet, try again later.

@Kobzol

Kobzol commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 10, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
Treat all proc macro dependencies as host dependencies in bootstrap
@Kobzol

Kobzol commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Ok, the 390x archive no longer contains the proc macros, but rustc-dev still contains them, good. Btw rust-lld has ~167 MiB because of the static LLVM linking, yikes.

@Kobzol

Kobzol commented Nov 10, 2026

Copy link
Copy Markdown
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 Nov 10, 2026
@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 69ae83c (69ae83c4247980676869da36e1a3948050efcf7a)
Base parent: 6f1c7ee (6f1c7ee0ec0ea64802f4b7a184b63b7efb645b3b)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (69ae83c): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (primary -2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-3.1%, -1.7%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.4% [-3.1%, -1.7%] 2

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 483.518s -> 483.731s (0.04%)
Artifact size: 407.10 MiB -> 406.46 MiB (-0.16%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bootstrap: cross-built rustc dist includes proc-macros in lib/

6 participants