diff options
author | Aaron Puchert <aaron.puchert@sap.com> | 2019-06-15 15:38:51 +0000 |
---|---|---|
committer | Aaron Puchert <aaron.puchert@sap.com> | 2019-06-15 15:38:51 +0000 |
commit | e1dc495e63023cc1df573f35a9714f5b43a9d8d8 (patch) | |
tree | cabc7455ce7bf234ea04b94c5fa04067b8646080 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 2d51adcb571408a9556d2af95371c3c9174d1407 (diff) | |
download | bcm5719-llvm-e1dc495e63023cc1df573f35a9714f5b43a9d8d8.tar.gz bcm5719-llvm-e1dc495e63023cc1df573f35a9714f5b43a9d8d8.zip |
[Clang] Harmonize Split DWARF options with llc
Summary:
With Split DWARF the resulting object file (then called skeleton CU)
contains the file name of another ("DWO") file with the debug info.
This can be a problem for remote compilation, as it will contain the
name of the file on the compilation server, not on the client.
To use Split DWARF with remote compilation, one needs to either
* make sure only relative paths are used, and mirror the build directory
structure of the client on the server,
* inject the desired file name on the client directly.
Since llc already supports the latter solution, we're just copying that
over. We allow setting the actual output filename separately from the
value of the DW_AT_[GNU_]dwo_name attribute in the skeleton CU.
Fixes PR40276.
Reviewers: dblaikie, echristo, tejohnson
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D59673
llvm-svn: 363496
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 4d04a86ea6b..46b075ff126 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -472,7 +472,7 @@ static void initTargetOptions(llvm::TargetOptions &Options, Options.EmitAddrsig = CodeGenOpts.Addrsig; if (CodeGenOpts.getSplitDwarfMode() != CodeGenOptions::NoFission) - Options.MCOptions.SplitDwarfFile = CodeGenOpts.SplitDwarfOutput; + Options.MCOptions.SplitDwarfFile = CodeGenOpts.SplitDwarfFile; Options.MCOptions.MCRelaxAll = CodeGenOpts.RelaxAll; Options.MCOptions.MCSaveTempLabels = CodeGenOpts.SaveTempLabels; Options.MCOptions.MCUseDwarfDirectory = !CodeGenOpts.NoDwarfDirectoryAsm; @@ -1428,7 +1428,8 @@ static void runThinLTOBackend(ModuleSummaryIndex *CombinedIndex, Module *M, Conf.RemarksWithHotness = CGOpts.DiagnosticsWithHotness; Conf.RemarksFilename = CGOpts.OptRecordFile; Conf.RemarksPasses = CGOpts.OptRecordPasses; - Conf.DwoPath = CGOpts.SplitDwarfOutput; + Conf.SplitDwarfFile = CGOpts.SplitDwarfFile; + Conf.SplitDwarfOutput = CGOpts.SplitDwarfOutput; switch (Action) { case Backend_EmitNothing: Conf.PreCodeGenModuleHook = [](size_t Task, const Module &Mod) { |