Uh oh!
There was an error while loading. Please reload this page.
Fix sysroot option not being honored across rustc - #80933
Conversation
rust-highfive
commented
Jan 12, 2021
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
rcvalle
commented
Jan 12, 2021
jyn514
commented
Jan 12, 2021
Is there a way to test this? |
It can be tested it by moving the libraries that come with the Rust distribution (including the sanitizer libraries) to a different location, and compiling a program using the -Zsanitizer option (e.g., -Zsanitizer=address). Before the fix, the build fails trying to link the sanitizer libraries from the same location regardless whether sysroot was specified; after the fix, the build succeeds if sysroot is specified to the (sysroot equivalent relative to the) location of the previously moved libraries that come with the Rust distribution and sanitizer libraries. |
nagisa
commented
Jan 13, 2021
@bors r+ Thanks! |
bors
commented
Jan 13, 2021
📌 Commit 8c16ad5de78883c2600072ec8d74abace5dd9fe4 has been approved by |
nagisa
commented
Jan 13, 2021
(Approved this even without the test because it seems super convoluted to test for, unlikely to regress, and the change looks correct without much doubt anyway) |
@bors r- The reason this uses the default sysroot instead of |
Uh, using the default sysroot regardless of |
tmiasko
commented
Jan 13, 2021
For the motivation behind the current implementation see #65241 (comment). Starting the search in the provided sysroot and then falling back to the default one sound fine to me. |
rust-log-analyzer
commented
Jan 20, 2021
The job Click to see the possible cause of the failure (guessed by this bot) |
rcvalle
commented
Jan 20, 2021
I've amended my commit to check if the sanitizer library exists in the specified/session sysroot, and if it doesn't exist, use the default sysroot. What do you think? |
rcvalle
commented
Jan 20, 2021
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
Change link_sanitizer_runtime() to check if the sanitizer library exists in the specified/session sysroot, and if it doesn't exist, use the default sysroot.
nagisa
commented
Jan 22, 2021
@bors r+ Now that it falls back to the old implementation if the prerequisite libraries are not found in the proper sysroot, there should be no regression for xargo/build-std use-cases. |
bors
commented
Jan 22, 2021
📌 Commit 7378676 has been approved by |
bors
commented
Jan 23, 2021
⌛ Testing commit 7378676 with merge 0d7abce4a48a9ef8907159ca96c1be64e762342e... |
bors
commented
Jan 23, 2021
💥 Test timed out |
rust-log-analyzer
commented
Jan 23, 2021
jyn514
commented
Jan 24, 2021
@bors retry |
…as-schievink Rollup of 14 pull requests Successful merges: - rust-lang#75180 (Implement Error for &(impl Error)) - rust-lang#78578 (Permit mutable references in all const contexts) - rust-lang#79174 (Make std::future a re-export of core::future) - rust-lang#79884 (Replace magic numbers with existing constants) - rust-lang#80855 (Expand assert!(expr, args..) to include $crate for hygiene on 2021.) - rust-lang#80933 (Fix sysroot option not being honored across rustc) - rust-lang#81259 (Replace version_check dependency with own version parsing code) - rust-lang#81264 (Add unstable option to control doctest run directory) - rust-lang#81279 (Small refactor in typeck) - rust-lang#81297 (Don't provide backend_optimization_level query for extern crates) - rust-lang#81302 (Fix rendering of stabilization version for trait implementors) - rust-lang#81310 (Do not mark unit variants as used when in path pattern) - rust-lang#81320 (Make bad shlex parsing a pretty error) - rust-lang#81338 (Clean up `dominators_given_rpo`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Change link_sanitizer_runtime() to check if the sanitizer library exists in the specified/session sysroot, and if it doesn't exist, use the default sysroot. (See #79253.)