[PATCH] D25263: [Driver] Allow setting the default linker during build
Jonas Hahnfeld via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 11 23:46:15 PST 2016
Hahnfeld accepted this revision.
Hahnfeld added a comment.
This revision is now accepted and ready to land.
LGTM with one nit
================
Comment at: lib/Driver/ToolChain.cpp:362
+ return UseLinker;
+ } else if (UseLinker == "ld") {
+ // If we're passed the argument ld, then use whatever the default system
----------------
phosek wrote:
> I'm wandering whether we shouldn't use `"platform"` instead of `"ld"` here to match what we do for `-rtlib=` and `-stdlib=`?
I'd say this is fine for compatibility
================
Comment at: lib/Driver/ToolChain.cpp:366
+ return GetProgramPath(getDefaultLinker());
+ } else if (!UseLinker.empty()) {
+ llvm::SmallString<8> LinkerName("ld.");
----------------
I think this will give an error for `-fuse-ld=` with no argument. Please revert the condition above to `UseLinker.empty() || UseLinker == "ld"` to match the current behaviour
Repository:
rL LLVM
https://reviews.llvm.org/D25263
More information about the cfe-commits
mailing list