We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb457f2 commit 35ec93cCopy full SHA for 35ec93c
src/codegen.cpp
@@ -493,9 +493,12 @@ struct JuliaVariable {
493
if (GlobalValue *V = m->getNamedValue(name))
494
return cast<GlobalVariable>(V);
495
auto T_size = m->getDataLayout().getIntPtrType(m->getContext());
496
- return new GlobalVariable(*m, _type(T_size),
+ auto var = new GlobalVariable(*m, _type(T_size),
497
isconst, GlobalVariable::ExternalLinkage,
498
NULL, name);
499
+ if (Triple(m->getTargetTriple()).isOSWindows())
500
+ var->setDLLStorageClass(GlobalValue::DLLStorageClassTypes::DLLImportStorageClass); // This is necessary to avoid auto import issues
501
+ return var;
502
}
503
GlobalVariable *realize(jl_codectx_t &ctx);
504
};
0 commit comments