Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy any file from stage0/lib to stage0-sysroot/lib #123186

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

onur-ozkan
Copy link
Member

With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like libLLVM.so.18.1-rust-1.78.0-beta, which is_dylib function cannot determine as it only looks whether files are ending with ".so" or not.
This change resolves this problem by no longer doing that ".so" check, as we need all files from the stage0/lib as they are all dependency of rustc anyway.

Fixes #122913

With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like
`libLLVM.so.18.1-rust-1.78.0-beta`, which `is_dylib` function cannot determine as it only
looks whether files are ending with ".so" or not.
This change resolves this problem by no longer doing that ".so" check, as we need all files
from the stage0/lib as they are all dependency of rustc anyway.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@rustbot
Copy link
Collaborator

rustbot commented Mar 29, 2024

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
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 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 Mar 29, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Mar 29, 2024

Confirmed that the LLVM file is copied into stage0-sysroot and cargo +stage0 build works.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 29, 2024

📌 Commit 5fe364a has been approved by Kobzol

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 Mar 29, 2024
@Noratrieb
Copy link
Member

I thought I fixed is_dylib when I fixed the nix patching?

@Kobzol
Copy link
Contributor

Kobzol commented Mar 29, 2024

That might be an orthogonal issue, but I would personally prefer to copy everything anyway, we just want to duplicate the lib directory to build the stage0 sysroot, so it seems more forward compatible to copy everything.

@onur-ozkan
Copy link
Member Author

I thought I fixed is_dylib when I fixed the nix patching?

Library name is libLLVM.so.18.1-rust-1.78.0-beta, is_lib doesn't do anything useful to detect it.

/// Returns `true` if the file name given looks like a dynamic library.
pub fn is_dylib(name: &str) -> bool {
name.ends_with(".dylib") || name.ends_with(".so") || name.ends_with(".dll")
}

@onur-ozkan
Copy link
Member Author

We also have a linker script file that ends with .so which isn't a dynamic library anyway.

@Noratrieb
Copy link
Member

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 29, 2024
copy any file from stage0/lib to stage0-sysroot/lib

With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like `libLLVM.so.18.1-rust-1.78.0-beta`, which `is_dylib` function cannot determine as it only looks whether files are ending with ".so" or not.
This change resolves this problem by no longer doing that ".so" check, as we need all files from the stage0/lib as they are all dependency of rustc anyway.

Fixes rust-lang#122913
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#123106 (CFI: Abstract Closures and Coroutines)
 - rust-lang#123176 (Normalize the result of `Fields::ty_with_args`)
 - rust-lang#123186 (copy any file from stage0/lib to stage0-sysroot/lib)
 - rust-lang#123187 (Forward port 1.77.1 release notes)
 - rust-lang#123188 (compiler: fix few unused_peekable and needless_pass_by_ref_mut clippy lints)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#123176 (Normalize the result of `Fields::ty_with_args`)
 - rust-lang#123186 (copy any file from stage0/lib to stage0-sysroot/lib)
 - rust-lang#123187 (Forward port 1.77.1 release notes)
 - rust-lang#123188 (compiler: fix few unused_peekable and needless_pass_by_ref_mut clippy lints)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b48411b into rust-lang:master Mar 29, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 29, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2024
Rollup merge of rust-lang#123186 - onur-ozkan:llvm-library-bug, r=Kobzol

copy any file from stage0/lib to stage0-sysroot/lib

With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like `libLLVM.so.18.1-rust-1.78.0-beta`, which `is_dylib` function cannot determine as it only looks whether files are ending with ".so" or not.
This change resolves this problem by no longer doing that ".so" check, as we need all files from the stage0/lib as they are all dependency of rustc anyway.

Fixes rust-lang#122913
@onur-ozkan onur-ozkan deleted the llvm-library-bug branch March 29, 2024 18:08
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.

Something about bootstrap stage0-sysroot broke with libLLVM
6 participants