Skip to content

Build TPDE with local Clang when available - #165275

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
TechnoPorg:push-wrpxssqqoxqw
Nov 5, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
TechnoPorg:push-wrpxssqqoxqw

Conversation

@TechnoPorg

Copy link
Copy Markdown
Contributor

As noted in #164108 (review), TPDE requires a clang with a major version <= the LLVM major version, and performance tends to be better when built with clang. This PR makes TPDE compilation and encodegen use the locally built clang if it's available.

I haven't added any sort of warning if llvm.clang is not set as TPDE will throw its own error if the major version is too high. Maybe it's worth doing so, though?

This also includes the TPDE compilation fix commit from #164108. We will see which ones makes it in first.

r? @ZuseZ4

@rustbot

rustbot commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

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

@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 1, 2026
@ZuseZ4

ZuseZ4 commented Nov 3, 2026

Copy link
Copy Markdown
Member

I don't think we need to add a warning this time. Clang isn't free to build, and there are legitimate setups where people have a suitable clang available externally and set the paths correctly. If someone's already using a new bootstrap feature like tpde, they'll hopefully read the docs.

@ZuseZ4

ZuseZ4 commented Nov 5, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1b5a973 has been tentatively approved by ZuseZ4

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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 Nov 5, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 5, 2026
…seZ4

Build TPDE with local Clang when available

As noted in rust-lang#164108 (review), TPDE requires a clang with a major version <= the LLVM major version, and performance tends to be better when built with clang. This PR makes TPDE compilation and encodegen use the locally built clang if it's available.

I haven't added any sort of warning if `llvm.clang` is _not_ set as TPDE will throw its own error if the major version is too high. Maybe it's worth doing so, though?

This also includes the TPDE compilation fix commit from rust-lang#164108. We will see which ones makes it in first.

r? @ZuseZ4
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 5, 2026
…seZ4

Build TPDE with local Clang when available

As noted in rust-lang#164108 (review), TPDE requires a clang with a major version <= the LLVM major version, and performance tends to be better when built with clang. This PR makes TPDE compilation and encodegen use the locally built clang if it's available.

I haven't added any sort of warning if `llvm.clang` is _not_ set as TPDE will throw its own error if the major version is too high. Maybe it's worth doing so, though?

This also includes the TPDE compilation fix commit from rust-lang#164108. We will see which ones makes it in first.

r? @ZuseZ4
rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #165496 (c-variadic: remove stale `cfg(bootstrap)` comment)
 - #164716 (Lower UEFI targets through LLVM's *uefi triple)
 - #165497 (fix unsoundness when compiling `[diverging_const; _]`)
 - #165275 (Build TPDE with local Clang when available)
 - #165467 (Use `emit_ptr_va_arg` for `va_arg` on MSP430)
 - #165483 (compiletest: Fix the edition of minicore to the latest stable one)
 - #165498 (LoongArch: Fix direct-access-external-data test)
 - #165501 (rustdoc: Don't add a border on an empty `:target` element)
@rust-bors
rust-bors Bot merged commit bca7769 into rust-lang:main Nov 5, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Nov 5, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
Rollup merge of #165275 - TechnoPorg:push-wrpxssqqoxqw, r=ZuseZ4

Build TPDE with local Clang when available

As noted in #164108 (review), TPDE requires a clang with a major version <= the LLVM major version, and performance tends to be better when built with clang. This PR makes TPDE compilation and encodegen use the locally built clang if it's available.

I haven't added any sort of warning if `llvm.clang` is _not_ set as TPDE will throw its own error if the major version is too high. Maybe it's worth doing so, though?

This also includes the TPDE compilation fix commit from #164108. We will see which ones makes it in first.

r? @ZuseZ4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants