[clang] [Cygwin] Cygwin -fuse-cxa-atexit (PR #74913)

εΎζŒζ’ Xu Chiheng via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 8 21:05:39 PST 2023


https://github.com/xu-chiheng created https://github.com/llvm/llvm-project/pull/74913

None

>From 75a8486443ef200abe12b4047ac89011ada15802 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E6=8C=81=E6=81=92=20Xu=20Chiheng?=
 <chiheng.xu at gmail.com>
Date: Sat, 9 Dec 2023 13:04:02 +0800
Subject: [PATCH] 1

---
 clang/lib/Driver/ToolChains/Clang.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index eb26bfade47b7a..df062ccc9021f7 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,7 +6656,8 @@ 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.isWindowsGNUEnvironment() &&
+              !RawTriple.isWindowsMSVCEnvironment() &&
               ((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
                RawTriple.hasEnvironment())) ||
       KernelOrKext)



More information about the cfe-commits mailing list