Use cc-rs to detect the default linker, instead of assuming cc#4807
Use cc-rs to detect the default linker, instead of assuming cc#4807djc merged 1 commit intorust-lang:mainfrom
cc-rs to detect the default linker, instead of assuming cc#4807Conversation
b70c77a to
aad36ed
Compare
|
@djc thanks for the review! Fixed nits, looking at how to re-bless the snapshot tests now, feel free to handle it, or I can look at the devguide. |
|
I think the test failures give a hint of how to update the snapshots? |
|
It's not immediately clear to me how to run the test suite directly. So, once I get tests running, I will try setting that env var. Currently trying to run via edit: the error above is from CI, I get different errors when building tests on macos, unrelated to the failing snapshot tests. |
|
You need |
cdabe14 to
efa509f
Compare
|
@djc CI is now green! Took a bit more time to use redaction to paper over the now More Helpful error that tells you what toolchain we look for. minor note: in terms of CI optimization, it might be worth cancelling jobs on first failure, or sequencing the more expensive macos/windows ci runners after the cheaper linux ones pass, or at least cancelling the old run after a new commit is pushed. Not sure if rustup gets enough PRs to make the utilization worth caring about, but there are a couple of ~30m jobs run on mac/win on every commit, and they don't stop if some other error is hit. |
432a300 to
faa757d
Compare
faa757d to
7599df8
Compare
|
Thanks, looks good! |
On hosts like
illumos,ccis not present in the path, leading to misleading warnings like:However, there is a linker present:
gcc. Since this warning at install time is to help ensure the system is prepared to do build.rs work, which typically usescc-rs, and has this additional metadata for targets, this PR uses thecc-rsinfra directly to determine the correct binary to search for. Ifcc-rshas nothing to say about our particular host, we fall back to the existing "just look forccin PATH" logic.There's a little unfortunate song and dance required, as
cc-rsdoesn't make this information directly available (requiring you to create aBuild, which then requires some information like opt-level and host/target triples to get the correct tool path), if this isn't palatable, I can follow up withcc-rsto see if they want to make this metadata a bit more directly obtainable.I'm not sure the best way to directly test the rustup install process using this branch, if there are docs somewhere I'm happy to run and verify the warning is skipped now on illumos targets.