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 | 85a2bd7b86535fb2eabeda3eaafb0e91c2b68331 (patch) | |
tree | 8cbe48f8002187adfd858749757b2f762fe38c8d /tools | |
parent | 7a5cd342c457e292f2ff36e6b3499d7a1d266882 (diff) | |
download | clang-85a2bd7b86535fb2eabeda3eaafb0e91c2b68331.tar.gz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/driver/cc1as_main.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index d98ba6ea42..59b7af5217 100644 --- a/tools/driver/cc1as_main.cpp +++ b/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); } |