[cfe-commits] r96655 - /cfe/trunk/lib/Driver/Tools.cpp

John McCall rjmccall at apple.com
Thu Feb 18 18:45:38 PST 2010


Author: rjmccall
Date: Thu Feb 18 20:45:38 2010
New Revision: 96655

URL: http://llvm.org/viewvc/llvm-project?rev=96655&view=rev
Log:
Enable -mconstructor-aliases by default on non-darwin platforms.
The linker bug holding this back is Darwin-specific.


Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=96655&r1=96654&r2=96655&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Feb 18 20:45:38 2010
@@ -799,6 +799,11 @@
     CmdArgs.push_back("Arguments");
   }
 
+  // Enable -mconstructor-aliases except on darwin, where we have to
+  // work around a linker bug;  see <rdar://problem/7651567>.
+  if (getToolChain().getTriple().getOS() != llvm::Triple::Darwin)
+    CmdArgs.push_back("-mconstructor-aliases");
+
   // This is a coarse approximation of what llvm-gcc actually does, both
   // -fasynchronous-unwind-tables and -fnon-call-exceptions interact in more
   // complicated ways.





More information about the cfe-commits mailing list