Fix broken-pipe-no-ice run-make test for rpath-less builds#140744
Fix broken-pipe-no-ice run-make test for rpath-less builds#140744jchecahi wants to merge 1 commit intorust-lang:masterfrom
Conversation
tests/run-make/broken-pipe-no-ice currently fails to run when rpath is disabled in bootstrap config, as the rustc and rustdoc binaries invoked cannot find the required shared libs (librustc_driver.so). This commit manually sets the dylib search path for both commands. The logic mirrors what's implemented in run_make_support::util::set_host_compiler_dylib_path, ensuring that the host compiler’s shared libraries are available at runtime even when rpath is disabled. This is necessary because the test manually constructs the rustc/rustdoc Command instances instead of using the run_make_support wrappers, and would otherwise lack the dynamic linker environment setup. Fixes part of rust-lang#140738
|
This PR modifies cc @jieyouxu |
|
I feel like I wrote the initial version of this test 🤔 AFAIK, this should just use the |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
Hi @jieyouxu, thanks for reviewing the PR! Actually, that was the first thing I tried 🙂 — I initially attempted to use the Because of that, I figured the test was intentionally written using a bare Command::new(...), and I mirrored the logic of Happy to explore alternatives if there's a clean way to use the wrappers here! |
|
D'oh right, that's why 😆 Can you try instead of reimplementing
|
|
Right, I went ahead and tried exposing Maybe adapting That being said, I’m happy to further discuss or explore any other suggestions you may have. Let me know what you think! |
|
Let me play around a bit with this locally, I'll get back to u tmrw. |
|
@rustbot review |
|
Hi @jchecahi, I have an alternative approach in #140843, where we allow "ejecting" a "configured" underlying |
|
@rustbot author (to check the alternative approach) |
|
The alternative approach in #140843 fixes the test in a cleaner and more reusable way. I'm closing this PR in favor of that one. |
Fix `broken-pipe-no-ice` run-make test for rpath-less builds The `broken-pipe-no-ice` run-make test currently fails on rpath-less builds, because host compiler runtime libs are not configured for raw std command usages. This PR is an alternative approach to rust-lang#140744. However, instead of duplicating `run_make_support::util::set_host_compiler_dylib_path` logic, we instead support "ejecting" the "configured" underlying std `Command` from `bare_rustc()` and `rustdoc()`, where host compiler runtime libs are already set. cc `@jchecahi` r? `@Kobzol`
Fix `broken-pipe-no-ice` run-make test for rpath-less builds The `broken-pipe-no-ice` run-make test currently fails on rpath-less builds, because host compiler runtime libs are not configured for raw std command usages. This PR is an alternative approach to rust-lang#140744. However, instead of duplicating `run_make_support::util::set_host_compiler_dylib_path` logic, we instead support "ejecting" the "configured" underlying std `Command` from `bare_rustc()` and `rustdoc()`, where host compiler runtime libs are already set. cc ``@jchecahi`` r? ``@Kobzol``
Rollup merge of rust-lang#140843 - jieyouxu:broken-pipe, r=Kobzol Fix `broken-pipe-no-ice` run-make test for rpath-less builds The `broken-pipe-no-ice` run-make test currently fails on rpath-less builds, because host compiler runtime libs are not configured for raw std command usages. This PR is an alternative approach to rust-lang#140744. However, instead of duplicating `run_make_support::util::set_host_compiler_dylib_path` logic, we instead support "ejecting" the "configured" underlying std `Command` from `bare_rustc()` and `rustdoc()`, where host compiler runtime libs are already set. cc `@jchecahi` r? `@Kobzol`
tests/run-make/broken-pipe-no-icecurrently fails to run when rpath is disabled in bootstrap config, as the rustc and rustdoc binaries invoked cannot find the required shared libs (librustc_driver.so).This commit manually sets the dylib search path for both commands. The logic mirrors what's implemented in
run_make_support::util::set_host_compiler_dylib_path, ensuring that the host compiler’s shared libraries are available at runtime even when rpath is disabled.This is necessary because the test manually constructs the rustc/rustdoc
Commandinstances instead of using therun_make_supportwrappers, and would otherwise lack the dynamic linker environment setup.Fixes part of #140738