diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2010-09-11 11:17:06 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2010-09-11 11:17:06 +0000 |
commit | d0a57d53223eccb482757c5aab436e8bd5a9c794 (patch) | |
tree | 19825b4eac3fd2eba169e98327abaa6641e0afed /lib/Driver/Tools.cpp | |
parent | 28709c14ac027d505eff42f9b7a48f415241fd24 (diff) |
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
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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. |