[clang] [Clang] [Driver] use __cxa_atexit by default on Cygwin. (PR #135701)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 22 13:58:12 PDT 2025
================
@@ -7230,7 +7230,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// -fuse-cxa-atexit is default.
if (!Args.hasFlag(
options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit,
- !RawTriple.isOSAIX() && !RawTriple.isOSWindows() &&
+ !RawTriple.isOSAIX() &&
+ (!RawTriple.isOSWindows() ||
+ RawTriple.isWindowsCygwinEnvironment()) &&
----------------
mstorsjo wrote:
As GCC doesn't use `__cxa_atexit` on mingw, we probably shouldn't change it unless we have good reason to do it. Best case it would be a simple uneventful change, worst case it would lead to a can of worms of breaking subtle things somewhere...
https://github.com/llvm/llvm-project/pull/135701
More information about the cfe-commits
mailing list