summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-12-21 22:09:34 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-12-21 22:09:34 +0000
commit2b9349db3888ee3df30382d2e647ead34adb5666 (patch)
tree66bd7b79661df35de2b2dbb65fe883eab08ee33f /clang/lib/Driver/Tools.cpp
parent03e2cc300747a4cfbe1cd05cc39ca247bddcb3f4 (diff)
downloadbcm5719-llvm-2b9349db3888ee3df30382d2e647ead34adb5666.tar.gz
bcm5719-llvm-2b9349db3888ee3df30382d2e647ead34adb5666.zip
[clang-cl] Add support for /Brepro
The /Brepro flag controls whether or not the compiler should embed timestamps into the object file. Object files which do not embed timestamps are not suitable for incremental linking but are suitable for hermetic build systems and staged self-hosts of clang. A normal clang spelling of this flag has been added, -mincremental-linker-compatible. llvm-svn: 256204
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index fd299ea695a..54570286779 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -2567,6 +2567,15 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
if (UseRelaxAll(C, Args))
CmdArgs.push_back("-mrelax-all");
+ // Only default to -mincremental-linker-compatible if we think we are
+ // targeting the MSVC linker.
+ bool DefaultIncrementalLinkerCompatible =
+ C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment();
+ if (Args.hasFlag(options::OPT_mincremental_linker_compatible,
+ options::OPT_mno_incremental_linker_compatible,
+ DefaultIncrementalLinkerCompatible))
+ CmdArgs.push_back("-mincremental-linker-compatible");
+
// When passing -I arguments to the assembler we sometimes need to
// unconditionally take the next argument. For example, when parsing
// '-Wa,-I -Wa,foo' we need to accept the -Wa,foo arg after seeing the
OpenPOWER on IntegriCloud