diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-12-21 22:09:34 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-12-21 22:09:34 +0000 |
commit | 2b9349db3888ee3df30382d2e647ead34adb5666 (patch) | |
tree | 66bd7b79661df35de2b2dbb65fe883eab08ee33f /clang/tools/driver/cc1as_main.cpp | |
parent | 03e2cc300747a4cfbe1cd05cc39ca247bddcb3f4 (diff) | |
download | bcm5719-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/tools/driver/cc1as_main.cpp')
-rw-r--r-- | clang/tools/driver/cc1as_main.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/tools/driver/cc1as_main.cpp b/clang/tools/driver/cc1as_main.cpp index d98ba6ea423..59b7af52174 100644 --- a/clang/tools/driver/cc1as_main.cpp +++ b/clang/tools/driver/cc1as_main.cpp @@ -125,6 +125,7 @@ struct AssemblerInvocation { unsigned RelaxAll : 1; unsigned NoExecStack : 1; unsigned FatalWarnings : 1; + unsigned IncrementalLinkerCompatible : 1; /// The name of the relocation model to use. std::string RelocationModel; @@ -144,6 +145,7 @@ public: RelaxAll = 0; NoExecStack = 0; FatalWarnings = 0; + IncrementalLinkerCompatible = 0; DwarfVersion = 0; } @@ -248,6 +250,8 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, Opts.NoExecStack = Args.hasArg(OPT_mno_exec_stack); Opts.FatalWarnings = Args.hasArg(OPT_massembler_fatal_warnings); Opts.RelocationModel = Args.getLastArgValue(OPT_mrelocation_model, "pic"); + Opts.IncrementalLinkerCompatible = + Args.hasArg(OPT_mincremental_linker_compatible); return Success; } @@ -394,9 +398,10 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple, Opts.CPU); Triple T(Opts.Triple); - Str.reset(TheTarget->createMCObjectStreamer(T, Ctx, *MAB, *Out, CE, *STI, - Opts.RelaxAll, - /*DWARFMustBeAtTheEnd*/ true)); + Str.reset(TheTarget->createMCObjectStreamer( + T, Ctx, *MAB, *Out, CE, *STI, Opts.RelaxAll, + Opts.IncrementalLinkerCompatible, + /*DWARFMustBeAtTheEnd*/ true)); Str.get()->InitSections(Opts.NoExecStack); } |