Skip to content

Commit

Permalink
more Win64
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Aug 23, 2012
1 parent ffe8936 commit 6ee1944
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
20 changes: 20 additions & 0 deletions std/moduleinit.d
Expand Up @@ -107,6 +107,15 @@ version (Solaris)
extern (C) ModuleReference *_Dmodule_ref; // start of linked list
}

version (Win64)
{
extern (C)
{
extern void* _minfo_beg;
extern void* _minfo_end;
}
}

version (none)
{
extern (C)
Expand Down Expand Up @@ -194,6 +203,17 @@ extern (C) void _moduleCtor()
//_fatexit(&_STD_moduleDtor);
}

else version (Win64)
{
_moduleinfo_array = (cast(ModuleInfo)&_minfo_beg)[1 .. &_minfo_end - &_minfo_end];

foreach (m; _moduleinfo_array)
{
//printf("\t%p\n", m);
printf("\t%.*s\n", m.name.length, m.name.ptr);
}
}

else
{
static assert("unsupported system");
Expand Down
16 changes: 9 additions & 7 deletions win64.mak
Expand Up @@ -14,6 +14,8 @@
# Notes:
# This relies on LIB.EXE 8.00 or later, and MAKE.EXE 5.01 or later.

MODEL=64

DIR=\dmd
VCDIR="\Program Files (x86)\Microsoft Visual Studio 10.0\VC"
SDKDIR="\Program Files (x86)\Microsoft SDKs\Windows\v7.0A"
Expand All @@ -26,10 +28,10 @@ CP=cp
CFLAGS=/O2 /I$(VCDIR)\INCLUDE /I$(SDKDIR)\Include
#CFLAGS=/Zi /I$(VCDIR)\INCLUDE /I$(SDKDIR)\Include

DFLAGS=-O -release -nofloat -w
#DFLAGS=-nofloat -w
#DFLAGS=-unittest -g -w
#DFLAGS=-unittest -cov -g
DFLAGS=-m$(MODEL) -O -release -nofloat -w
#DFLAGS=-m$(MODEL) -nofloat -w
#DFLAGS=-m$(MODEL) -unittest -g -w
#DFLAGS=-m$(MODEL) -unittest -cov -g

DMD=$(DIR)\windows\bin\dmd
#DMD=..\dmd
Expand Down Expand Up @@ -61,7 +63,7 @@ test.obj : test.d
test.exe : test.obj $(PHOBOSLIB)
$(DMD) test.obj -g -L/map

OBJS= deh.obj complex.obj gcstats.obj \
OBJS= deh2.obj complex.obj gcstats.obj \
critical.obj object.obj monitor.obj \
crc32.obj \
Czlib.obj Dzlib.obj process.obj \
Expand Down Expand Up @@ -416,8 +418,8 @@ complex.obj : internal\complex.c
critical.obj : internal\critical.c
$(CC) -c $(CFLAGS) internal\critical.c

deh.obj : internal\deh.d
$(DMD) -c $(DFLAGS) internal\deh.d
deh2.obj : internal\deh2.d
$(DMD) -c $(DFLAGS) internal\deh2.d

dmain2.obj : internal\dmain2.d
$(DMD) -c $(DFLAGS) internal\dmain2.d
Expand Down

0 comments on commit 6ee1944

Please sign in to comment.