]> granicus.if.org Git - clang/commitdiff
Don't pass -split-dwarf= to the backend unless we're on linux for
authorEric Christopher <echristo@gmail.com>
Thu, 21 Feb 2013 22:35:05 +0000 (22:35 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 21 Feb 2013 22:35:05 +0000 (22:35 +0000)
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175814 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
test/Driver/split-debug.c

index da23fd513027d3f27690a696f5ef163a51a1116a..27d019b4fc9da3b1e6239dfc7d363672efd6be76 100644 (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");
index a3711e4c0f52b11eb6e2659b5e1f677ef37d8229..fb01953b0d61e22b040523efb0ac2bc134c8abed 100644 (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