Closed as not planned
Closed as not planned
Description
I tried this code:
fn main() {
println!("Hello, world!");
}
with cargo +nightly build --verbose -Z build-std --target x86_64-apple-ios-macabi
source: https://github.com/imWildCat-archived/rs-demo/blob/main/src/main.rs
I expected to see this happen: this code can be built with cargo, with nightly toolchain, targeting x86_64-apple-ios-macabi
Instead, this happened:
Compiling rs-demo v0.1.0 (/Users/runner/work/rs-demo/rs-demo)
...
...
= note: ld: warning: directory not found for option '-L/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-ios-macabi/lib'
[80](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:81)
ld: warning: directory not found for option '-L/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-ios-macabi/lib'
[81](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:82)
ld: building for Mac Catalyst, but linking in object file built for , file '/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps/rs_demo-521d12542c4c7be3.184v2gvf82jr0rex.rcgu.o'
[82](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:83)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[83](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:84)
[84](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:85)
[85](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:86)
error: could not compile `rs-demo` due to previous error
[86](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:87)
[87](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:88)
Caused by:
[88](https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479#step:6:89)
process didn't exit successfully: `rustc --crate-name rs_demo --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C metadata=521d12542c4c7be3 -C extra-filename=-521d12542c4c7be3 --out-dir /Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps --target x86_64-apple-ios-macabi -C incremental=/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/incremental -L dependency=/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps -L dependency=/Users/runner/work/rs-demo/rs-demo/target/debug/deps --extern 'noprelude:alloc=/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps/liballoc-9c4e6a45fc1dc0a3.rlib' --extern 'noprelude:compiler_builtins=/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps/libcompiler_builtins-7d186f938ad1e774.rlib' --extern 'noprelude:core=/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps/libcore-339a72cfd77df96f.rlib' --extern 'noprelude:panic_unwind=/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps/libpanic_unwind-06c139a128f5078d.rlib' --extern 'noprelude:proc_macro=/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps/libproc_macro-b6089ec1e1d5f8a1.rlib' --extern 'noprelude:std=/Users/runner/work/rs-demo/rs-demo/target/x86_64-apple-ios-macabi/debug/deps/libstd-a6b8e5f053fdec98.rlib' -Z unstable-options` (exit status: 1)
Meta
rustc --version --verbose
:
rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-apple-darwin
release: 1.67.0
LLVM version: 15.0.6
(source)
Nightly version:
rustc 1.69.0-nightly (658fad6c5 2023-02-03)
Full repro: https://github.com/imWildCat-archived/rs-demo/actions/runs/4092406201/jobs/7057120479
Additional notes
This bug has been existing since last summer, probably before +nightly-2022-08-08
.
Previously I thought it is related to #106925
But it should be a different issue.
I'm happy to propose a fix. However, I'm not sure where I can start. May I have some hint?