tauri-docs icon indicating copy to clipboard operation
tauri-docs copied to clipboard

[docs]Cross-platform compilation error: linker `lld` not found on MacOS

Open hiwanz opened this issue 2 years ago • 0 comments

📋 Page(s) affected (or suggested, for new content)

https://github.com/tauri-apps/tauri-docs/blob/24ed0bf9bd66a518e15a4a22e5c2cec3c2a8a56c/docs/guides/building/cross-platform.md?plain=1#L242

📋 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",
]

hiwanz avatar Jan 17 '24 05:01 hiwanz