]> granicus.if.org Git - clang/commitdiff
Invoke the Darwin assembler with -g instead of --gdwarf2.
authorBob Wilson <bob.wilson@apple.com>
Wed, 2 Nov 2011 05:10:45 +0000 (05:10 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 2 Nov 2011 05:10:45 +0000 (05:10 +0000)
The -g and --gdwarf2 options are currently synonyms to the Darwin assembler.
But clang itself does not recognize --gdwarf2, so if we want to experiment
with using clang, with its integrated assembler, to replace the default
assembler, it is necessary to use -g.  <rdar://problem/10349486>

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

lib/Driver/Tools.cpp

index 1a8c2e834cf9d3b0c077596ba4ad6a546e2fb307..4811b03979faf0d451de8bc5ae50c4320e9c0455 100644 (file)
@@ -3130,7 +3130,7 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
     if (Args.hasArg(options::OPT_gstabs))
       CmdArgs.push_back("--gstabs");
     else if (Args.hasArg(options::OPT_g_Group))
-      CmdArgs.push_back("--gdwarf2");
+      CmdArgs.push_back("-g");
   }
 
   // Derived from asm spec.