Skip to content

Commit 5062f77

Browse files
committed
[X86][Cygwin] Fix global variable dll import
1 parent fac6be6 commit 5062f77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/TargetMachine.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ bool TargetMachine::shouldAssumeDSOLocal(const GlobalValue *GV) const {
204204
// don't assume the variables to be DSO local unless we actually know
205205
// that for sure. This only has to be done for variables; for functions
206206
// the linker can insert thunks for calling functions from another DLL.
207-
if (TT.isWindowsGNUEnvironment() && GV->isDeclarationForLinker() &&
207+
if ((TT.isWindowsGNUEnvironment() || TT.isWindowsCygwinEnvironment()) &&
208+
GV->isDeclarationForLinker() &&
208209
isa<GlobalVariable>(GV))
209210
return false;
210211

0 commit comments

Comments
 (0)