From 76d866f7935b746e5e50e7d760344c14502bd8e7 Mon Sep 17 00:00:00 2001 From: Tomohiro Kashiwada Date: Thu, 15 May 2025 04:21:09 +0900 Subject: [Cygwin] Global symbols should be external by default (#139797) Behaves as same as both of Clang and GCC targetting MinGW. Required for compatibility for Cygwin-GCC. Divided from https://github.com/llvm/llvm-project/pull/138773 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 50041f8..16e010a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1689,7 +1689,7 @@ static bool shouldAssumeDSOLocal(const CodeGenModule &CGM, const llvm::Triple &TT = CGM.getTriple(); const auto &CGOpts = CGM.getCodeGenOpts(); - if (TT.isWindowsGNUEnvironment()) { + if (TT.isOSCygMing()) { // In MinGW, variables without DLLImport can still be automatically // imported from a DLL by the linker; don't mark variables that // potentially could come from another DLL as DSO local. -- cgit v1.1