Skip to content

Commit

Permalink
Switch to new build strategy for MPS on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Mar 12, 2023
1 parent 0451a89 commit d1a9551
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 71 deletions.
3 changes: 1 addition & 2 deletions sources/jamfiles/x86-win32-vc6-build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ LINKFLAGS ?= /NODEFAULTLIB

# External libraries linked with the dylan library
# (via the Linker-Options: keyword in Sources/dylan/dylan.lid)
rtlibs ?= kernel32.lib pentium-run-time.lib mmdw.lib mpsplinth.lib
minvcrt.lib ;
rtlibs ?= kernel32.lib pentium-run-time.lib minvcrt.lib ;

# External libraries linked with libraries other than the dylan library
# (via the DylanLibrary function defined below)
Expand Down
3 changes: 1 addition & 2 deletions sources/jamfiles/x86-win32-vc8-build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ LINKFLAGS ?= /NODEFAULTLIB /INCREMENTAL:NO /DEBUG /MANIFEST ;

# External libraries linked with the dylan library
# (via the Linker-Options: keyword in Sources/dylan/dylan.lid)
rtlibs ?= kernel32.lib pentium-run-time.lib mmdw.lib mpsplinth.lib
minvcrt.lib ;
rtlibs ?= kernel32.lib pentium-run-time.lib minvcrt.lib ;

# External libraries linked with libraries other than the dylan library
# (via the DylanLibrary function defined below)
Expand Down
73 changes: 6 additions & 67 deletions sources/lib/run-time/Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,16 @@ CC = $(cc)
LINKLIB = $(implib) /nologo /out:
CFLAGS = $(cflags) $(cvarsmt) $(cdebug) /I$(INCLUDEDEST) /I. /I.. /I$(SDK4MEMORY_POOL_SYSTEM)\code $(OPEN_DYLAN_C_FLAGS) /DOPEN_DYLAN_PLATFORM_WINDOWS /DGC_USE_MPS /DOPEN_DYLAN_ARCH_X86 /DOPEN_DYLAN_BACKEND_HARP
HEAPOBJS = heap-display.obj heap-utils.obj heap-trail.obj heap-order1.obj heap-order2.obj heap-table.obj
OBJS = collector.obj break.obj $(HEAPOBJS) thread-utils.obj harp-support\x86-windows\runtime.obj windows-threads-primitives.obj windows-spy-interfaces.obj windows-harp-support.obj
OBJS = collector.obj break.obj $(HEAPOBJS) thread-utils.obj harp-support\x86-windows\runtime.obj windows-threads-primitives.obj windows-spy-interfaces.obj windows-harp-support.obj mps-dylan.obj
LIBFILE = pentium-run-time.lib
USEROBJ = harp-support\x86-windows\dylan-support.obj
USERLIB = dylan-support.lib
MINCRT = minvcrt.lib

RUNTIMELIBDEST = $(LIBDEST)\pentium-run-time.lib
MMDWDEST = $(LIBDEST)\mmdw.lib
PLINTHDEST = $(LIBDEST)\mpsplinth.lib
MINCRTDEST = $(LIBDEST)\minvcrt.lib

RELEASEMMDW = $(SDK4MEMORY_POOL_SYSTEM)\code\w3i3mv\hi\mmdw.lib
RELEASEPLINTH = $(SDK4MEMORY_POOL_SYSTEM)\code\w3i3mv\hi\mpsplan.lib

DEBUGMMDW = debug-mmdw.lib
DEBUGPLINTH = debug-mpsplan.lib

SYMBOLICMMDW = symbolic-mmdw.lib
SYMBOLICPLINTH = mpsplan.lib

PLINTHOBJS = plinth.obj mpsiowin32.obj
DYLANPLINTH = dylan-plinth.lib

!if defined(fullcrt)
$(MINCRT):
Expand All @@ -72,11 +60,8 @@ rtsyms.obj: rtsyms.s
as -n -o rtsyms.obj rtsyms.s
!endif

$(DYLANPLINTH): $(PLINTHOBJS)
$(LINKLIB)$(DYLANPLINTH) $(PLINTHOBJS)

$(LIBFILE): $(OBJS)
$(LINKLIB)$(LIBFILE) $(OBJS)
$(LIBFILE): $(OBJS) $(PLINTHOBJS)
$(LINKLIB)$(LIBFILE) $(OBJS) $(PLINTHOBJS)

$(USERLIB): $(USEROBJ)
$(LINKLIB)$(USERLIB) $(USEROBJ)
Expand All @@ -103,25 +88,6 @@ install-runtime: $(LIBFILE)
pushd $(LIBDEST) & (del /q /f $(LIBFILE)) & popd
copy $(LIBFILE) $(LIBDEST)

install-dylan-plinth: $(DYLANPLINTH)
echo Building pentium run time: install-dylan-plinth
if exist $(PLINTHDEST) del /q /f $(PLINTHDEST)
copy $(DYLANPLINTH) $(PLINTHDEST)

install-ansi-plinth: $(SYMBOLICPLINTH)
echo Building pentium run time: install-ansi-plinth
if exist $(PLINTHDEST) del /q /f $(PLINTHDEST)
copy $(SYMBOLICPLINTH) $(PLINTHDEST)

install-debug-ansi-plinth: $(DEBUGPLINTH)
echo Building pentium run time: install-debug-ansi-plinth
if exist $(PLINTHDEST) del /q /f $(PLINTHDEST)
copy $(DEBUGPLINTH) $(PLINTHDEST)

install-plinth: install-dylan-plinth
echo Building pentium run time: install-plinth


!if defined(fullcrt)
install-mincrt:
echo Building pentium run time: install-mincrt (fullcrt)
Expand All @@ -132,42 +98,15 @@ install-mincrt: $(MINCRT)
copy $(MINCRT) $(MINCRTDEST)
!endif

install-mmdw:
echo Building pentium run time: install-mmdw
if exist $(MMDWDEST) del /q /f $(MMDWDEST)
if not exist $(RELEASEMMDW) pushd $(SDK4MEMORY_POOL_SYSTEM)\code \
& $(MAKE) /k /f w3i3mv.nmk mmdw.lib > $(BUILD_LOGS)\make-mmdw.log \
& popd
copy $(RELEASEMMDW) $(MMDWDEST)

install-symbolic-mmdw: $(SYMBOLICMMDW)
echo Building pentium run time: install-symbolic-mmdw
if exist $(MMDWDEST) del /q /f $(MMDWDEST)
copy $(SYMBOLICMMDW) $(MMDWDEST)

install-debug-mmdw: $(DEBUGMMDW)
echo Building pentium run time: install-debug-mmdw
if exist $(MMDWDEST) del /q /f $(MMDWDEST)
copy $(DEBUGMMDW) $(MMDWDEST)


install-common-libs: ensure-dirs install-plinth install-userlib install-mincrt


install-stripped: ensure-dirs install-mmdw install-runtime install-common-libs

install-debug: ensure-dirs install-debug-mmdw install-runtime install-common-libs

install-symbolic: ensure-dirs install-symbolic-mmdw install-runtime install-common-libs

install-common-libs: ensure-dirs install-userlib install-mincrt

install: ensure-dirs install-stripped install-build
install: ensure-dirs install-runtime install-common-libs install-build

# Only delete the products that should be built by this makefile.
# (The files runtime.obj & dylan-support.obj are checked out from HOPE)
clean:
pushd . & (del /f /q *collector.obj break.obj $(HEAPOBJS) thread-utils.obj windows-threads-primitives.obj windows-spy-interfaces.obj windows-harp-support.obj) & popd
pushd . & (del /f /q *pentium-run-time.lib $(USERLIB)) & popd
pushd . & (del /f /q $(MINCRT) mincrt.def) & popd
pushd . & (del /f /q $(DYLANPLINTH) $(PLINTHOBJS)) & popd
pushd . & (del /f /q $(PLINTHOBJS)) & popd

4 changes: 4 additions & 0 deletions sources/lib/run-time/mps-dylan.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* for details.
*/

#ifdef OPEN_DYLAN_PLATFORM_WINDOWS
#define CONFIG_PLINTH_NONE
#endif

#include "mps.c"
#include "fmtdy.c"
#include "fmtno.c" // fmtdy "inherits" from fmtno.

0 comments on commit d1a9551

Please sign in to comment.