summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains/Clang.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:45 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:45 +0000
commit570918821a8492048e6ab54955c9864bd6c3e952 (patch)
treef9d0d3f3478c298aaf51987483bbbbefe8e6631b /lib/Driver/ToolChains/Clang.cpp
parentf0c55418e2b09eaab37c820d3756cc1b4584d084 (diff)
Diffstat (limited to 'lib/Driver/ToolChains/Clang.cpp')
-rw-r--r--lib/Driver/ToolChains/Clang.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp
index 6e1e4ccf44f05..555847aeeb23d 100644
--- a/lib/Driver/ToolChains/Clang.cpp
+++ b/lib/Driver/ToolChains/Clang.cpp
@@ -2773,12 +2773,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// -gsplit-dwarf should turn on -g and enable the backend dwarf
// splitting and extraction.
// FIXME: Currently only works on Linux.
- if (getToolChain().getTriple().isOSLinux() && SplitDwarfArg) {
+ if (getToolChain().getTriple().isOSLinux()) {
if (!splitDwarfInlining)
CmdArgs.push_back("-fno-split-dwarf-inlining");
- if (DebugInfoKind == codegenoptions::NoDebugInfo)
- DebugInfoKind = codegenoptions::LimitedDebugInfo;
- CmdArgs.push_back("-enable-split-dwarf");
+ if (SplitDwarfArg) {
+ if (DebugInfoKind == codegenoptions::NoDebugInfo)
+ DebugInfoKind = codegenoptions::LimitedDebugInfo;
+ CmdArgs.push_back("-enable-split-dwarf");
+ }
}
// After we've dealt with all combinations of things that could