Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to new build strategy for MPS on Windows. #1481

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
72 changes: 4 additions & 68 deletions sources/lib/run-time/Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,15 @@ 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 plinth.obj mpsiowin32.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):
!else
Expand All @@ -72,9 +58,6 @@ rtsyms.obj: rtsyms.s
as -n -o rtsyms.obj rtsyms.s
!endif

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

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

Expand Down Expand Up @@ -103,25 +86,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 +96,14 @@ 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 *collector.obj break.obj $(HEAPOBJS) thread-utils.obj windows-threads-primitives.obj windows-spy-interfaces.obj windows-harp-support.obj mps-dylan.obj plinth.obj mpsiowin32.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

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.