-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
compiletest: set the dylib path when gathering target cfg #103072
Conversation
r? @jyn514 (rust-highfive has picked a reviewer for you, use r? to override) |
@bors r+ |
📌 Commit 97c3608326d123f5462e3504409a3a069611c0fb has been approved by It is now in the queue for this repository. |
☔ The latest upstream changes (presumably #103727) made this pull request unmergeable. Please resolve the merge conflicts. |
If the compiler is built with `rpath = false`, then it won't find its own libraries unless the library search path is set. We already do that while running the actual compiletests, but rust-lang#100260 added another rustc command for getting the target cfg. Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) thread 'main' panicked at 'error: failed to get cfg info from "[...]/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" --- stdout --- stderr [...]/build/x86_64-unknown-linux-gnu/stage1/bin/rustc: error while loading shared libraries: librustc_driver-a2a76dc626cd02d2.so: cannot open shared object file: No such file or directory ', src/tools/compiletest/src/common.rs:476:13 Now the library path is set here as well, so it works without rpath.
97c3608
to
f8a0cc2
Compare
Rebased. @bors r=Mark-Simulacrum |
…earth Rollup of 8 pull requests Successful merges: - rust-lang#103072 (compiletest: set the dylib path when gathering target cfg) - rust-lang#103084 (Derive `Eq` and `Hash` for `ControlFlow`) - rust-lang#103575 (Change #[suggestion_*] attributes to use style="...") - rust-lang#103637 (Use stdio in UWP apps) - rust-lang#103638 (Add `multivalue` target feature to WASM target) - rust-lang#103781 (Detect unused files in `src/test/mir-opt` and error on them in tidy.) - rust-lang#103837 (Migrate sidebar-links-color GUI test to functions) - rust-lang#103839 (Print valid `--print` requests if request is invalid) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
@cuviper I know you're a busy man, but do you think its possible for you to give a brief example on how to test if my rustc binary is affected by this? It seems to me that you were unable to compile/bootstrap your rustc binary on x86_64-unknown-linux-gnu, however I did not have any problems with bootstraping mine on armv7a-unknown-linux-musleabihf, despite using |
This only affects the in-tree testsuite, like Once you've built the toolchain and installed it somewhere, it's up to you to make sure that your library path is correct. This hasn't changed. |
If the compiler is built with
rpath = false
, then it won't find itsown libraries unless the library search path is set. We already do that
while running the actual compiletests, but #100260 added another rustc
command for getting the target cfg.
Now the library path is set here as well, so it works without rpath.