Skip to content

Commit

Permalink
Try changing the check again
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi committed May 24, 2024
1 parent d921b0a commit a81055d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ struct JuliaVariable {
auto var = new GlobalVariable(*m, _type(T_size),
isconst, GlobalVariable::ExternalLinkage,
NULL, name);
if (Triple(m->getTargetTriple()).isOSBinFormatCOFF())
if (Triple(m->getTargetTriple()).isOSWindows())
var->setDLLStorageClass(GlobalValue::DLLStorageClassTypes::DLLImportStorageClass); // This is necessary to avoid auto import issues
return var;
}
Expand Down Expand Up @@ -1789,10 +1789,6 @@ static inline GlobalVariable *prepare_global_in(Module *M, GlobalVariable *G)
G->isConstant(), GlobalVariable::ExternalLinkage,
nullptr, G->getName(), nullptr, G->getThreadLocalMode());
proto->copyAttributesFrom(G);
// DLLImport only needs to be set for the shadow module
// it just gets annoying in the JIT
if (Triple(M->getTargetTriple()).getObjectFormat() != Triple::COFF)
proto->setDLLStorageClass(GlobalValue::DefaultStorageClass);
return proto;
}
return cast<GlobalVariable>(local);
Expand Down

0 comments on commit a81055d

Please sign in to comment.