]> granicus.if.org Git - clang/commitdiff
Disable cxa_atexit by default on MingW.
authorAnton Korobeynikov <asl@math.spbu.ru>
Sat, 11 Sep 2010 11:17:06 +0000 (11:17 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sat, 11 Sep 2010 11:17:06 +0000 (11:17 +0000)
Patch by Dimitry Andric!

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

lib/Driver/Tools.cpp

index 9c5371ff0bdfaa6eefe97b9159ed5ce25f9e74f8..e902eaa3816df272fba05cf3c67f879adca9fcf3 100644 (file)
@@ -1207,8 +1207,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("-fno-threadsafe-statics");
 
   // -fuse-cxa-atexit is default.
-  if (KernelOrKext || !Args.hasFlag(options::OPT_fuse_cxa_atexit,
-                                    options::OPT_fno_use_cxa_atexit))
+  if (KernelOrKext ||
+    !Args.hasFlag(options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit,
+                  getToolChain().getTriple().getOS() != llvm::Triple::MinGW32 &&
+                  getToolChain().getTriple().getOS() != llvm::Triple::MinGW64))
     CmdArgs.push_back("-fno-use-cxa-atexit");
 
   // -fms-extensions=0 is default.