[clang] [Cygwin] Cygwin -fuse-cxa-atexit (PR #74913)
εΎζζ Xu Chiheng via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 23:51:35 PST 2023
https://github.com/xu-chiheng updated https://github.com/llvm/llvm-project/pull/74913
>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 01/12] 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)
>From 899b095dd1953fc8a766dee221723dfbf1e3a3e5 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:24:01 +0800
Subject: [PATCH 02/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index df062ccc9021f7..eb26bfade47b7a 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,8 +6656,7 @@ 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.isWindowsGNUEnvironment() &&
- !RawTriple.isWindowsMSVCEnvironment() &&
+ !RawTriple.isOSAIX() && !RawTriple.isOSWindows() &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From 4fd5b816334bd8ccd8215f69f88dcbcc56f71857 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:39:22 +0800
Subject: [PATCH 03/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index eb26bfade47b7a..fd75ad033c4dca 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,7 +6656,7 @@ 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()) &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From a51bba69eb1e2f7f509e42830e54ce71de99e74a 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:44:11 +0800
Subject: [PATCH 04/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index fd75ad033c4dca..3e2c07399387d5 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,7 +6656,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.isWindowsCygwinEnvironment()) &&
+ !RawTriple.isOSAIX() &&
+ !(RawTriple.isOSWindows() &&
+ !RawTriple.isWindowsCygwinEnvironment()) &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From 3b906c82e613d08c6b153b355019dbf939045896 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 14:07:41 +0800
Subject: [PATCH 05/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 3e2c07399387d5..e67adf3d6616e6 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6658,7 +6658,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit,
!RawTriple.isOSAIX() &&
!(RawTriple.isOSWindows() &&
- !RawTriple.isWindowsCygwinEnvironment()) &&
+ RawTriple.getEnvironment() != Triple::Cygnus) &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From 95fd87b707ac444db248f356ccadaefe53ba4740 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 14:17:43 +0800
Subject: [PATCH 06/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index e67adf3d6616e6..e5e46f2a3f0536 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6658,7 +6658,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit,
!RawTriple.isOSAIX() &&
!(RawTriple.isOSWindows() &&
- RawTriple.getEnvironment() != Triple::Cygnus) &&
+ true) &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From da5fa42326c725bcb84703f376b98c14203838b5 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 14:39:52 +0800
Subject: [PATCH 07/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index e5e46f2a3f0536..df062ccc9021f7 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,9 +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() &&
- true) &&
+ !RawTriple.isOSAIX() && !RawTriple.isWindowsGNUEnvironment() &&
+ !RawTriple.isWindowsMSVCEnvironment() &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From f9622d33e4c40b99b017521d84dc4060738d21ff 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 14:43:39 +0800
Subject: [PATCH 08/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index df062ccc9021f7..eb26bfade47b7a 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,8 +6656,7 @@ 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.isWindowsGNUEnvironment() &&
- !RawTriple.isWindowsMSVCEnvironment() &&
+ !RawTriple.isOSAIX() && !RawTriple.isOSWindows() &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From 4568d36961b6645aa34d3a547eb4a8bde22a4722 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 14:47:17 +0800
Subject: [PATCH 09/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index eb26bfade47b7a..fd75ad033c4dca 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,7 +6656,7 @@ 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()) &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From 4fcad6bad969e4b191898b1dbf8821b6fb42dca9 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 15:03:20 +0800
Subject: [PATCH 10/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index fd75ad033c4dca..18ed48f336a361 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,7 +6656,7 @@ 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.isWindowsCygwinEnvironment()) &&
+ !RawTriple.isOSAIX() && !(RawTriple.isOSWindows() && !(RawTriple.isWindowsCygwinEnvironment())) &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From 828911da2ff8fb5603caa3f268dbf87783dd6f31 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 15:20:30 +0800
Subject: [PATCH 11/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 18ed48f336a361..24e87e083a8a05 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,7 +6656,7 @@ 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.isWindowsCygwinEnvironment())) &&
+ !RawTriple.isOSAIX() && !(RawTriple.isOSWindows() && true) &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
>From df018540be40fd1c6c0c3903d04f756b8b46ade3 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 15:51:05 +0800
Subject: [PATCH 12/12] 1
---
clang/lib/Driver/ToolChains/Clang.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 24e87e083a8a05..1ca9c722a0678f 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,7 +6656,7 @@ 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() && true) &&
+ !RawTriple.isOSAIX() && !(RawTriple.isOSWindows() && (true || !RawTriple.isWindowsCygwinEnvironment())) &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
More information about the cfe-commits
mailing list