Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2063 from rainers/issue15482
Browse files Browse the repository at this point in the history
fix issue 15482 - new uuid.d forbids to link statically with other libs
  • Loading branch information
andralex committed Jan 28, 2018
2 parents 2411c52 + 3c369df commit f2f3f24
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/core/sys/windows/uuid.d
Expand Up @@ -3,8 +3,6 @@ version (Windows):

import core.sys.windows.basetyps;

export
extern(C) {
const IID _DBBMKGUID = {0xF6304BB0, 0xD188, 0x11CD, [0xAD, 0x48, 0x00, 0xAA, 0x00, 0x3C, 0x9C, 0xB6]};
const IID _DBCIDGUID = {0xFE284700, 0xD188, 0x11CD, [0xAD, 0x48, 0x00, 0xAA, 0x00, 0x3C, 0x9C, 0xB6]};
const IID _GUID_NAMEONLY = {0xE8BF1170, 0xD188, 0x11CD, [0xAD, 0x48, 0x00, 0xAA, 0x00, 0x3C, 0x9C, 0xB6]};
Expand Down Expand Up @@ -4077,4 +4075,3 @@ const IID TID_D3DRMVector = {0x3D82AB5E, 0x62DA, 0x11CF, [0xAB, 0x39, 0x00, 0x20
const IID TID_DXFILEHeader = {0x3D82AB43, 0x62DA, 0x11CF, [0xAB, 0x39, 0x00, 0x20, 0xAF, 0x71, 0xE4, 0x33]};
const IID WKPDID_D3DDebugObjectName = {1117490210, 37256, 19212, [135, 66, 172, 176, 191, 133, 194, 0]};
const IID WKPDID_D3DDebugObjectNameW = {1288331224, 37407, 17096, [133, 102, 112, 202, 242, 169, 183, 65]};
}
14 changes: 14 additions & 0 deletions test/uuid/test.d
@@ -0,0 +1,14 @@
// test for duplicate symbols in druntime and uuid.lib
module test;

version(CRuntime_Microsoft) {} else static assert(false, "Windows/COFF only");

import core.sys.windows.basetyps;
import core.sys.windows.uuid;

extern extern(C) IID IID_IDelayedPropertyStoreFactory; // from uuid.lib

void main()
{
assert(IID_IDirect3DNullDevice != IID_IDelayedPropertyStoreFactory);
}
10 changes: 10 additions & 0 deletions test/uuid/win64.mak
@@ -0,0 +1,10 @@
# built from the druntime top-level folder
# to be overwritten by caller
DMD=dmd
MODEL=64
DRUNTIMELIB=druntime64.lib

test:
$(DMD) -m$(MODEL) -conf= -Isrc -defaultlib=$(DRUNTIMELIB) test\uuid\test.d uuid.lib
del test.exe test.obj

7 changes: 6 additions & 1 deletion win64.mak
Expand Up @@ -1295,6 +1295,11 @@ druntime32mscoff:
unittest32mscoff:
$(MAKE) -f win64.mak "DMD=$(DMD)" MODEL=32mscoff "CC=\$(CC32)"\"" "AR=\$(AR)"\"" "VCDIR=$(VCDIR)" "SDKDIR=$(SDKDIR)" unittest

################### tests ######################################

test_uuid:
$(MAKE) -f test\uuid\win64.mak "DMD=$(DMD)" MODEL=$(MODEL) "VCDIR=$(VCDIR)" DRUNTIMELIB=$(DRUNTIME) test

################### zip/install/clean ##########################

zip: druntime.zip
Expand All @@ -1314,4 +1319,4 @@ clean:

auto-tester-build: target

auto-tester-test: unittest
auto-tester-test: unittest test_uuid

0 comments on commit f2f3f24

Please sign in to comment.