Open therealjasonkenney opened 6 months ago
-demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -static -arch x86_64 -platform_version macos 10.12.0 14.2 ...
Those flags are for the macOS linker and not compatible with Linux linkers. It looks like you are trying to cross compile your program for macOS instead of for x86_64-unknown-linux-musl.
I am trying to cross compile my rust code to
x86_64-unknown-linux-musl
I have tried in.cargo/config.toml
:But something somewhere is setting these flags. I tried using
bash -l
to isolate env pollution which helped remove-lconv
from the lib list.Not sure what I should do. (Currently using clang 16)
bash -l 'cargo build -p mtomd --release --target=x86_64-unknown-linux-musl'
This outputs the following mold command: ``` "/nix/store/fm5083fc4ylj6zyld7n1j270m8kx0q8i-mold-2.31.0/bin/mold" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -static -arch x86_64 -platform_version macos 10.12.0 14.2 ...