diff --git a/gen/toobj.c b/gen/toobj.c index 67ab88f7..913efa74 100644 --- a/gen/toobj.c +++ b/gen/toobj.c @@ -598,7 +598,7 @@ void VarDeclaration::toObjFile() llvmValue = gvar; // if extern don't emit initializer - if (!(storage_class & STCextern)) + if (!(storage_class & STCextern) && getModule() == gIR->dmodule) { _init = DtoConstInitializer(t, init);