Skip to content

Allow choosing an alternative linker and manifest tool at runtime - #156

Merged
dra27 merged 3 commits into
ocaml:masterfrom
MisterDA:tool-selection
Apr 1, 2025
Merged

dra27 merged 3 commits into
ocaml:masterfrom
MisterDA:tool-selection

Conversation

@MisterDA

@MisterDA MisterDA commented Feb 28, 2025 •

Copy link
Copy Markdown
Contributor

Introduce two new options, -use-linker=<cmd> and -use-mt=<cmd>.

This allows using lld-link instead of link, for instance; and allows using llvm-mt instead of mt.exe.

The options accept any string blindly, but we could restrict to bfd, gold, lld, mold, link, and lld-link (if so, users may have to provide symlinks if the linker is versioned, e.g. make lld-link point to lld-link-20).

@dra27 dra27 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bike-shedding a name and a description, but this clearly passes the same strings as before if the arguments aren't used, so looks perfectly safe, thanks!

Comment thread cmdline.ml Resolved
@MisterDA
MisterDA force-pushed the tool-selection branch 3 times, most recently from 1b42d8d to 09c0cf5 Compare March 30, 2025 17:24

@dra27 dra27 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

MisterDA added 3 commits April 1, 2025 14:37
Allows using lld-link instead of link, for instance.
This allows using llvm-mt instead of mt.exe.
@dra27
dra27 merged commit e09690c into ocaml:master Apr 1, 2025
@MisterDA
MisterDA deleted the tool-selection branch April 1, 2025 19:04
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