From: Anton Korobeynikov Date: Sat, 11 Sep 2010 11:17:06 +0000 (+0000) Subject: Disable cxa_atexit by default on MingW. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0a57d53223eccb482757c5aab436e8bd5a9c794;p=clang Disable cxa_atexit by default on MingW. Patch by Dimitry Andric! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113683 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 9c5371ff0b..e902eaa381 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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.