Skip to content

Add instructions for using Wild with Rust on Illumos.#1171

Merged
davidlattimore merged 1 commit into
wild-linker:mainfrom
daniel-levin:illumos_explainer
Oct 8, 2025
Merged

Add instructions for using Wild with Rust on Illumos.#1171
davidlattimore merged 1 commit into
wild-linker:mainfrom
daniel-levin:illumos_explainer

Conversation

@daniel-levin

Copy link
Copy Markdown
Contributor

The actual, correct resolution to #1153. It turns out that Clang is very picky and platform-dependent about delegating to arbitrary linkers. Mercifully, Clang will still provide GNU-ld compatible arguments to Wild. As such there is no need to understand Sun ld's argument parser.

@daniel-levin

daniel-levin commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

For those interested in this tooth-pulling exercise, it's worth noting that Clang and GCC's treatment of -fuse-ld is even more different and platform-specific than the comments in integration_tests.rs suggest. Concretely, On Illumos, gcc (gcc (OmniOS 151054/14.2.0-il-1) 14.2.0 ) will joyfully but erroneously pass Sun ld flags to lld, gold, and even GNU bfd (go figure) if you use the -fuse-ld argument.

Driver Argument Result
clang None Uses Sun ld with valid and correct arguments
clang -fuse-ld=/absolute/path/wild Uses Wild at the absolute path, with GNU ld-compatible arguments 🥳 (but one aberrant -C)
clang -fuse-ld=wild Fails, moaning about invalid linker name
clang -fuse-ld=lld Fails, moaning about invalid linker name despite it being LLVM's linker
clang -fuse-ld=ld Uses GNU ld
clang -fuse-ld=gld Uses GNU ld; not gold
gcc None Uses Sun ld with valid and correct arguments, but that are different from what Clang passes to Sun ld ceteris paribus
gcc -fuse-ld=ld Uses GNU ld with Sun ld arguments (somehow passes)
gcc -fuse-ld=lld Uses lld with Sun ld arguments (explodes)
gcc -fuse-ld=wild Refuses to recognize argument; explodes
gcc -fuse-ld=/abs/path/to/wild/ gcc: error: unrecognized command-line option '-fuse-ld=/home/omnios/.cargo/bin/wild'

@davidlattimore davidlattimore merged commit 4020103 into wild-linker:main Oct 8, 2025
20 checks passed
@daniel-levin daniel-levin deleted the illumos_explainer branch October 9, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants