Skip to content

Commit 798a40a

Browse files
committed
[LLVM][Cygwin] Enable conditions that are shared with MinGW
Cygwin and MinGW share the auto import behavior that could result in __stack_check_guard being non-dso-local. Allow windres to assume a Cygwin target as well as a MinGW one, so defines like _WIN32 would not be present on Cygwin.
1 parent c875bb8 commit 798a40a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/CodeGen/TargetLoweringBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,7 @@ void TargetLoweringBase::insertSSPDeclarations(Module &M) const {
20622062

20632063
// FreeBSD has "__stack_chk_guard" defined externally on libc.so
20642064
if (M.getDirectAccessExternalData() &&
2065-
!TM.getTargetTriple().isWindowsGNUEnvironment() &&
2065+
!TM.getTargetTriple().isOSCygMing() &&
20662066
!(TM.getTargetTriple().isPPC64() &&
20672067
TM.getTargetTriple().isOSFreeBSD()) &&
20682068
(!TM.getTargetTriple().isOSDarwin() ||

llvm/tools/llvm-rc/llvm-rc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ std::string getMingwTriple() {
201201
Triple T(sys::getDefaultTargetTriple());
202202
if (!isUsableArch(T.getArch()))
203203
T.setArch(getDefaultFallbackArch());
204-
if (T.isWindowsGNUEnvironment())
204+
if (T.isOSCygMing())
205205
return T.str();
206206
// Write out the literal form of the vendor/env here, instead of
207207
// constructing them with enum values (which end up with them in

0 commit comments

Comments
 (0)