mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 10:57:35 +03:00
Windows: Map export
to DLL storage classes for data too
Not just functions. Fixes issue #2437.
This commit is contained in:
parent
eed0faae55
commit
eb8b150be0
3 changed files with 15 additions and 9 deletions
|
@ -896,13 +896,11 @@ void DtoResolveVariable(VarDeclaration *vd) {
|
|||
// as well).
|
||||
gvar->setAlignment(DtoAlignment(vd));
|
||||
|
||||
/* TODO: set DLL storage class when `export` is fixed (an attribute)
|
||||
// Windows: initialize DLL storage class with `dllimport` for `export`ed
|
||||
// symbols
|
||||
if (global.params.isWindows && vd->isExport()) {
|
||||
auto c = vd->isImportedSymbol() ? LLGlobalValue::DLLImportStorageClass
|
||||
: LLGlobalValue::DLLExportStorageClass;
|
||||
gvar->setDLLStorageClass(c);
|
||||
gvar->setDLLStorageClass(LLGlobalValue::DLLImportStorageClass);
|
||||
}
|
||||
*/
|
||||
|
||||
applyVarDeclUDAs(vd, gvar);
|
||||
if (varIr->dynamicCompileConst) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue