Skip to content

Conversation

onur-ozkan
Copy link
Contributor

@onur-ozkan onur-ozkan commented Apr 8, 2024

From: #123586 (comment)

Even if llvm.download-ci-llvm is set to true, stage > 0 rustc will always use the prebuilt LLVM library which comes with ci-rustc. So I tried to use locally-built LLVM libraries in the ci-rustc by replacing the existing LLVM libraries with the locally built ones, and it appears that this is indeed a limitation of using rust.download-rustc=true as it fails with the following error:

$ ./build/host/ci-rustc/bin/rustc --version
./build/host/ci-rustc/bin/rustc: symbol lookup error: /home/nimda/devspace/.other/rustc-builds/build/x86_64-unknown-linux-gnu/ci-rustc/bin/../lib/librustc_driver-a03ea465d8e03db1.so: undefined symbol: LLVMInitializeARMTargetInfo, version LLVM_18.1

So, if rust.download-rustc is set to true and llvm.download-ci-llvm is false, I believe bootstrap should terminate the process (as it always uses prebuilt LLVM libraries from ci-rustc, there is no point to build LLVM locally) while parsing the configuration.

Resolves #123586

r? Mark-Simulacrum

@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 Apr 8, 2024
@rustbot

This comment was marked as outdated.

@onur-ozkan onur-ozkan force-pushed the restrict-llvm-option branch 3 times, most recently from 63c4a2a to 83f203c Compare April 8, 2024 21:06
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the restrict-llvm-option branch from 83f203c to a7aa7fd Compare April 8, 2024 21:10
@rustbot
Copy link
Collaborator

rustbot commented Apr 8, 2024

This PR modifies config.example.toml.

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

@rust-log-analyzer

This comment was marked as outdated.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 13, 2024

📌 Commit a7aa7fd has been approved by Mark-Simulacrum

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 Apr 13, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 13, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#123530 (Enable building tier2 target riscv32im-unknown-none-elf)
 - rust-lang#123642 (do not allow using local llvm while using rustc from ci)
 - rust-lang#123716 (Update documentation of Path::to_path_buf and Path::ancestors)
 - rust-lang#123876 (Update backtrace submodule)
 - rust-lang#123888 (Replace a `DefiningOpaqueTypes::No` with `Yes` by asserting that one side of the comparison is a type variable.)
 - rust-lang#123890 (removed (mostly) unused code)
 - rust-lang#123891 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 873de7e into rust-lang:master Apr 13, 2024
@rustbot rustbot added this to the 1.79.0 milestone Apr 13, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 13, 2024
Rollup merge of rust-lang#123642 - onur-ozkan:restrict-llvm-option, r=Mark-Simulacrum

do not allow using local llvm while using rustc from ci

From: rust-lang#123586 (comment)

> Even if `llvm.download-ci-llvm` is set to true, `stage > 0` rustc will always use the prebuilt LLVM library which comes with ci-rustc. So I tried to use locally-built LLVM libraries in the ci-rustc by replacing the existing LLVM libraries with the locally built ones, and it appears that this is indeed a limitation of using `rust.download-rustc=true` as it fails with the following error:
>
> ```
> $ ./build/host/ci-rustc/bin/rustc --version
> ./build/host/ci-rustc/bin/rustc: symbol lookup error: /home/nimda/devspace/.other/rustc-builds/build/x86_64-unknown-linux-gnu/ci-rustc/bin/../lib/librustc_driver-a03ea465d8e03db1.so: undefined symbol: LLVMInitializeARMTargetInfo, version LLVM_18.1
> ```
>
> So, if `rust.download-rustc` is set to true and `llvm.download-ci-llvm` is false, I believe bootstrap should terminate the process (as it always uses prebuilt LLVM libraries from ci-rustc, there is no point to build LLVM locally) while parsing the configuration.

Resolves rust-lang#123586

r? Mark-Simulacrum
@onur-ozkan onur-ozkan deleted the restrict-llvm-option branch April 13, 2024 17:21
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.

tools depending on rustc crates can't build with rust.download-rustc=true and llvm.download-ci-llvm=false options

5 participants