[docs]Cross-platform compilation error: linker `lld` not found on MacOS
hiwanz opened this issue · comments
丸子 commented
📋 Page(s) affected (or suggested, for new content)
📋 Description or bullet point outline (if proposing new content)
I have install llvm
via homebrew without errors, the lld
command can be executed in shell, but when i am running tauri build --target x86_64-pc-windows-msvc
it throws an error saying error: linker `lld` not found
, setting linker = "/usr/local/opt/llvm/bin/lld"
will work fine for me.
➜ lld
lld is a generic driver.
Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
.cargo/config.toml
[target.x86_64-pc-windows-msvc]
linker = "/usr/local/opt/llvm/bin/lld"
rustflags = [
"-Lnative=/path/to/.xwin/crt/lib/x86_64",
"-Lnative=/path/to/.xwin/sdk/lib/um/x86_64",
"-Lnative=/path/to/.xwin/sdk/lib/ucrt/x86_64",
]
Fabian-Lars commented
We updated the guide to cargo-xwin which should be able to find it. The config.toml file is also gone.