-
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
-Z gcc-ld=lld fails again #101653
Comments
#100200 introduced the target parameter |
I managed to find an old x64 mac, Xcode 13 on OS 11.6.1, and can reproduce the issue there, so I'll try to look into it. |
> find /Applications/Xcode.app/Contents/Developer/Platforms -name crt1.10.6.o
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/crt1.10.6.o There is a |
On |
So removing the On this osx/sdk/etc, clang does find (Similarly, on the aarch64, it still works and finds I'll make a PR soon. |
Any progress on it? Nightly build 2022-09-13 still reproduce the problem. |
Ensure `lld` is supported with `download-ci-llvm` This PR: - ensures LLD's step in bootstrap's dist, but it's not strictly necessary since dist will already package it when it's present. - makes bootstrap's `native::LLD` step support using the packaged `ci-llvm/bin/lld`, instead of building it from source (which would most likely not be available today, nor in the future where `download-ci-llvm = if-available` is the default). If I understand correctly, `--enable-full-tools` will also enable `rust.lld`, and this is why LLD is already packaged today in the `rust-dev` component on the main targets (and why `-Zgcc-ld=lld` does work there). That means it's likely that this PR will not be able to land before I've reworked and landed rust-lang#101792: if LLD is available in `download-ci-llvm`, the `needs-rust-lld` tests should start being executed on the x64 macOS test builders, and CI would fail today. I've tested locally that building with `download-ci-llvm = true` and `lld = true` with the LLVM submodule unregistered was successful, and that `rust-lld` and the various `lld-wrapper`s are present and `-Zgcc-ld=lld` works as well, on a few different platforms: - `x86_64-unknown-linux-gnu` - `aarch64-apple-darwin` - `x86_64-pc-windows-msvc` (with `-Clinker=rust-lld` rather than `-Zgcc-ld=lld`) - `x86_64-apple-darwin`, with the `MACOSX_DEPLOYMENT_TARGET` workaround for rust-lang#101653 I don't think we really need to bump the `download-ci-llvm-stamp` in this case, since `./build/$triple/ci-llvm/bin/lld` is present on all the above targets already, but have added it mechanically, and it should probably be removed to avoid unnecessary downloads/churn. Fixes rust-lang#98340 Supersedes rust-lang#100010
I tried this code:
RUSTFLAGS='-Z gcc-ld=lld' cargo +nightly build --release
I expected to see this happen: it builds my crate.
Instead, this happened:
Meta
rustc --version --verbose
:I found in the invocation of
cc
nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/bin/gcc-ld" "-fuse-ld=lld" "--target=x86_64-apple-macosx10.7.0"
Backtrace
See #101504 (comment).
The text was updated successfully, but these errors were encountered: