diff options
author | Tim Northover <tnorthover@apple.com> | 2015-06-12 19:21:35 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2015-06-12 19:21:35 +0000 |
commit | 018578c3953cb541d14c79e716f12f66510b9f2b (patch) | |
tree | 170c4b240a64a328a59aefddcd229f82c3ef0828 /clang/lib/Driver/Driver.cpp | |
parent | 8f01f1cfc377c62cd649fe1b614cc362afecb59c (diff) | |
download | bcm5719-llvm-018578c3953cb541d14c79e716f12f66510b9f2b.tar.gz bcm5719-llvm-018578c3953cb541d14c79e716f12f66510b9f2b.zip |
Driver: only set -mlinker-version based on host if it's valid
We were adding an extra "-mlinker-version" argument to the invocation
based on a value inferred from "ld -v". This is set by the build
systems to either a sane value or an empty string (e.g. for custom
built ld), which we don't want to pass on.
No test really possible because the value depends on both host system
and how CMake was invoked.
llvm-svn: 239633
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 5b34f9842dc..a8d084f1a6b 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -277,7 +277,8 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const { // Add a default value of -mlinker-version=, if one was given and the user // didn't specify one. #if defined(HOST_LINK_VERSION) - if (!Args.hasArg(options::OPT_mlinker_version_EQ)) { + if (!Args.hasArg(options::OPT_mlinker_version_EQ) && + strlen(HOST_LINK_VERSION) > 0) { DAL->AddJoinedArg(0, Opts->getOption(options::OPT_mlinker_version_EQ), HOST_LINK_VERSION); DAL->getLastArg(options::OPT_mlinker_version_EQ)->claim(); |