cs: update Windows build
Support non-"CS"-suffix mode, and avoid installing bytecode for traditional Racket when builing a bootstrap traditional Racket.
This commit is contained in:
parent
af554933ef
commit
8c3956a272
24
Makefile
24
Makefile
|
@ -178,6 +178,8 @@ INSTALL_SETUP_ARGS = $(SELF_FLAGS_qq) PLT_SETUP_OPTIONS="$(JOB_OPTIONS) $(PLT_SE
|
|||
|
||||
BASE_INSTALL_TARGET = plain-base-install
|
||||
|
||||
WIN32_BUILD_LEVEL = 3m
|
||||
|
||||
base:
|
||||
if [ "$(CPUS)" = "" ] ; \
|
||||
then $(MAKE) plain-base ; \
|
||||
|
@ -205,7 +207,7 @@ win32-base:
|
|||
$(MAKE) win32-remove-setup-dlls
|
||||
IF NOT EXIST build\config cmd /c mkdir build\config
|
||||
cmd /c echo #hash((links-search-files . ())) > build\config\config.rktd
|
||||
cmd /c racket\src\worksp\build-at racket\src\worksp ..\..\..\build\config $(JOB_OPTIONS) $(PLT_SETUP_OPTIONS)
|
||||
cmd /c racket\src\worksp\build-at racket\src\worksp ..\..\..\build\config $(WIN32_BUILD_LEVEL) $(JOB_OPTIONS) $(PLT_SETUP_OPTIONS)
|
||||
|
||||
# Start by removing DLLs that may be loaded by `raco setup`
|
||||
win32-remove-setup-dlls:
|
||||
|
@ -365,17 +367,29 @@ clone-ChezScheme-as-extra:
|
|||
|
||||
WIN32_CS_COPY_ARGS_EXCEPT_PKGS = SRC_CATALOG="$(SRC_CATALOG)"
|
||||
WIN32_CS_COPY_ARGS = PKGS="$(PKGS)" $(WIN32_CS_COPY_ARGS_EXCEPT_PKGS)
|
||||
WIN32_CS_COPY_ARGS_BOOT = $(WIN32_CS_COPY_ARGS) SETUP_BOOT_MODE="$(SETUP_BOOT_MODE)" WIN32_BUILD_LEVEL="$(WIN32_BUILD_LEVEL)"
|
||||
|
||||
WIN32_BOOT_ARGS = SETUP_BOOT_MODE=--boot WIN32_BUILD_LEVEL=cgc WIN32_PLAIN_RACKET=racket\racketcgc
|
||||
|
||||
win32-cs:
|
||||
IF "$(RACKET)" == "" $(MAKE) win32-racket-then-cs $(WIN32_CS_COPY_ARGS)
|
||||
IF "$(RACKET)" == "" $(MAKE) win32-racket-then-cs $(WIN32_BOOT_ARGS) $(WIN32_CS_COPY_ARGS)
|
||||
IF not "$(RACKET)" == "" $(MAKE) win32-just-cs RACKET="$(RACKET)" SCHEME_SRC="$(SCHEME_SRC)" $(WIN32_CS_COPY_ARGS)
|
||||
|
||||
win32-racket-then-cs:
|
||||
$(MAKE) win32-minimal-in-place PKGS="" $(WIN32_CS_COPY_ARGS_EXCEPT_PKGS)
|
||||
$(MAKE) win32-just-cs RACKET=$(WIN32_PLAIN_RACKET) SCHEME_SRC="$(SCHEME_SRC)" $(WIN32_CS_COPY_ARGS)
|
||||
$(MAKE) win32-base PKGS="" $(WIN32_CS_COPY_ARGS_EXCEPT_PKGS) WIN32_BUILD_LEVEL="$(WIN32_BUILD_LEVEL)"
|
||||
$(MAKE) win32-just-cs RACKET=$(WIN32_PLAIN_RACKET) SCHEME_SRC="$(SCHEME_SRC)" $(WIN32_CS_COPY_ARGS_BOOT)
|
||||
|
||||
CSBUILD_ARGUMENTS = --scheme-dir "$(SCHEME_SRC)" \
|
||||
--racketcs-suffix "$(RACKETCS_SUFFIX)" \
|
||||
--boot-mode "$(SETUP_BOOT_MODE)"
|
||||
|
||||
WIN32_SETUP_BOOT = -O "info@compiler/cm" \
|
||||
-l- setup $(SETUP_BOOT_MODE) racket/src/setup-go.rkt racket/src/build/compiled \
|
||||
ignored racket/src/build/ignored.d
|
||||
|
||||
win32-just-cs:
|
||||
cmd /c $(RACKET) racket\src\worksp\csbuild.rkt --scheme-dir "$(SCHEME_SRC)"
|
||||
IF NOT EXIST racket\src\build cmd /c mkdir racket\src\build
|
||||
cmd /c $(RACKET) $(WIN32_SETUP_BOOT) racket\src\worksp\csbuild.rkt $(CSBUILD_ARGUMENTS)
|
||||
IF NOT EXIST build\config cmd /c mkdir build\config
|
||||
cmd /c echo #hash((links-search-files . ())) > build\config\config.rktd
|
||||
racket\racket$(RACKETCS_SUFFIX) -G build\config -N raco -l- raco setup $(JOB_OPTIONS) $(PLT_SETUP_OPTIONS)
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
cd %1
|
||||
set BUILD_CONFIG=%2
|
||||
set BUILD_LEVEL=%3
|
||||
|
||||
set PLT_SETUP_OPTIONS=--no-foreign-libs
|
||||
:suloop
|
||||
if "%3"=="" goto sudone
|
||||
set PLT_SETUP_OPTIONS=%PLT_SETUP_OPTIONS% %3
|
||||
if "%4"=="" goto sudone
|
||||
set PLT_SETUP_OPTIONS=%PLT_SETUP_OPTIONS% %4
|
||||
shift
|
||||
goto suloop
|
||||
:sudone
|
||||
|
|
|
@ -30,6 +30,9 @@ if errorlevel 1 exit /B 1
|
|||
if errorlevel 1 exit /B 1
|
||||
msbuild racket%PLTSLNVER%.sln /p:Configuration=Release /p:Platform=%BUILDMODE%
|
||||
|
||||
if not defined BUILD_LEVEL set BUILD_LEVEL="3m"
|
||||
if "%BUILD_LEVEL%"=="cgc" goto doneBuilding
|
||||
|
||||
cd ..\gracket
|
||||
msbuild gracket%PLTSLNVER%.sln /p:Configuration=Release /p:Platform=%BUILDMODE%
|
||||
if errorlevel 1 exit /B 1
|
||||
|
@ -78,3 +81,5 @@ if errorlevel 1 exit /B 1
|
|||
|
||||
..\..\racket -G ..\%BUILD_CONFIG% -u gendef.rkt
|
||||
if errorlevel 1 exit /B 1
|
||||
|
||||
:doneBuilding
|
||||
|
|
|
@ -12,8 +12,10 @@ LIBS = $(RKTIO_LIB) \
|
|||
DEST = ..\..\build\raw_racketcs.exe
|
||||
CSDIR = ..\..\cs\c
|
||||
|
||||
COMP_SUBDIR = /DCS_COMPILED_SUBDIR
|
||||
|
||||
$(DEST): $(CSDIR).\main.c $(CSDIR)\boot.c $(RKTIO_LIB)
|
||||
cl /Fe$(DEST) /Ox /MT $(INCS) $(CSDIR)\main.c $(CSDIR)\boot.c $(LIBS)
|
||||
cl /Fe$(DEST) /Ox /MT $(COMP_SUBDIR) $(INCS) $(CSDIR)\main.c $(CSDIR)\boot.c $(LIBS)
|
||||
|
||||
|
||||
# Useful for debugging:
|
||||
|
|
|
@ -13,12 +13,18 @@
|
|||
(define machine (if (= 32 (system-type 'word))
|
||||
"ti3nt"
|
||||
"ta6nt"))
|
||||
(define cs-suffix "CS")
|
||||
(define boot-mode "--chain")
|
||||
|
||||
(command-line
|
||||
#:once-each
|
||||
[("--scheme-dir") dir "Select the Chez Scheme build directory, unless <dir> is \"\""
|
||||
(unless (equal? dir "")
|
||||
(set! abs-scheme-dir (path->complete-path dir)))]
|
||||
[("--racketcs-suffix") str "Select the suffix for RacketCS"
|
||||
(set! cs-suffix (string-upcase str))]
|
||||
[("--boot-mode") mode "Select the mode for Racket bootstrapping"
|
||||
(set! boot-mode mode)]
|
||||
[("--machine") mach "Select the Chez Scheme machine name"
|
||||
(set! machine mach)]
|
||||
#:args
|
||||
|
@ -75,8 +81,9 @@
|
|||
(define rel-racket (build-path 'up "worksp" (find-relative-path (current-directory) (find-exe))))
|
||||
|
||||
(define chain-racket
|
||||
(format "~a -W info@compiler/cm -l- setup --chain ../setup-go.rkt ../build/compiled"
|
||||
rel-racket))
|
||||
(format "~a -O info@compiler/cm -l- setup ~a ../setup-go.rkt ../build/compiled"
|
||||
rel-racket
|
||||
boot-mode))
|
||||
|
||||
(define build-dir (path->directory-path (build-path 'up "build")))
|
||||
|
||||
|
@ -145,7 +152,11 @@
|
|||
"..\\..\\build\\raw_racketcs.exe"
|
||||
(format "SCHEME_DIR=~a" rel2-scheme-dir)
|
||||
(format "MACHINE=~a" machine)
|
||||
(format "SCHEME_LIB=~a" scheme-lib)))
|
||||
(format "SCHEME_LIB=~a" scheme-lib)
|
||||
(format "COMP_SUBDIR=/DCS_COMPILED_SUBDIR=~a"
|
||||
(if (string=? cs-suffix "")
|
||||
"0"
|
||||
"1"))))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
|
@ -156,8 +167,11 @@
|
|||
"../build/racket.boot")
|
||||
|
||||
(system*! (find-exe)
|
||||
"-O" "info@compiler/cm"
|
||||
"-l-" "setup" boot-mode "../setup-go.rkt" "..//build/compiled"
|
||||
"ignored" "../build/ignored.d"
|
||||
"../cs/c/embed-boot.rkt"
|
||||
"../build/raw_racketcs.exe"
|
||||
"../../RacketCS.exe"
|
||||
(format "../../Racket~a.exe" cs-suffix)
|
||||
(build-path scheme-dir machine "boot" machine)
|
||||
"../build/racket.boot")
|
||||
|
|
Loading…
Reference in New Issue
Block a user