Don't pass -split-dwarf= to the backend unless we're on linux for

now.

llvm-svn: 175814
This commit is contained in:
Eric Christopher 2013-02-21 22:35:05 +00:00
parent 248357f624
commit d42fb73fc7
2 changed files with 7 additions and 1 deletions

View File

@ -2311,7 +2311,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// -gsplit-dwarf should turn on -g and enable the backend dwarf
// splitting and extraction.
if (Args.hasArg(options::OPT_gsplit_dwarf)) {
// FIXME: Currently only works on Linux.
if (getToolChain().getTriple().getOS() == llvm::Triple::Linux &&
Args.hasArg(options::OPT_gsplit_dwarf)) {
CmdArgs.push_back("-g");
CmdArgs.push_back("-backend-option");
CmdArgs.push_back("-split-dwarf=Enable");

View File

@ -8,3 +8,7 @@
// CHECK-ACTIONS: objcopy{{.*}}--strip-dwo{{.*}}"split-debug.o"
// RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s
//
// CHECK-NO-ACTIONS-NOT: -split-dwarf