update build guide and READMEs for CS as default

This commit is contained in:
Matthew Flatt 2020-08-02 07:11:46 -06:00
parent e6752e9afc
commit 2885df0347
9 changed files with 200 additions and 205 deletions

View File

@ -15,7 +15,7 @@ and how to contribute to Racket development.
>> [1.3 Quick Instructions: In-Place Build](#13-quick-instructions-in-place-build) >> [1.3 Quick Instructions: In-Place Build](#13-quick-instructions-in-place-build)
>> [1.4 Quick Instructions: Unix-Style Install](#14-quick-instructions-unix-style-install) >> [1.4 Quick Instructions: Unix-Style Install](#14-quick-instructions-unix-style-install)
>> [1.5 More Instructions: Building Racket](#15-more-instructions-building-racket) >> [1.5 More Instructions: Building Racket](#15-more-instructions-building-racket)
>> [1.6 More Instructions: Building Racket on Chez Scheme](#16-more-instructions-building-racket-on-chez-scheme) >> [1.6 More Instructions: Building Racket CS and Racket BC](#16-more-instructions-building-racket-cs-and-racket-bc)
>> [1.7 Even More Instructions: Building Racket Pieces](#17-even-more-instructions-building-racket-pieces) >> [1.7 Even More Instructions: Building Racket Pieces](#17-even-more-instructions-building-racket-pieces)
>>> [1.7.1 Building Minimal Racket](#171-building-minimal-racket) >>> [1.7.1 Building Minimal Racket](#171-building-minimal-racket)
>>> [1.7.2 Installing Packages](#172-installing-packages) >>> [1.7.2 Installing Packages](#172-installing-packages)
@ -105,10 +105,12 @@ have several options:
created, and you can create your own. See [Distributing Racket created, and you can create your own. See [Distributing Racket
Variants](#2-distributing-racket-variants) for more instructions. Variants](#2-distributing-racket-variants) for more instructions.
* **In-place Racket on Chez Scheme build** — This mode builds using Chez * **In-place Racket BC build** — This mode builds the old Racket
Scheme via `make cs`. Chez Scheme is itself built from a subtree of implementation (where “BC” means “bytecode” or “before Chez Scheme”).
the Racket source repository. Final executables with names that end in Final executables with names that end in `bc` or `BC` are the Racket
`cs` or `CS` are the Racket on Chez Scheme variants. BC variants. See [More Instructions: Building Racket CS and Racket
BC](#16-more-instructions-building-racket-cs-and-racket-bc) for more
information.
### 1.3. Quick Instructions: In-Place Build ### 1.3. Quick Instructions: In-Place Build
@ -120,9 +122,6 @@ and 2019/16.0), `nmake win` creates a build in the `"racket"` directory.
For information on configuring your command-line environment for Visual For information on configuring your command-line environment for Visual
Studio, see `"racket/src/worksp/README.txt"`. Studio, see `"racket/src/worksp/README.txt"`.
On Windows with MinGW, use `make PLAIN_RACKET=racket/racket`, since
MinGW uses Unix-style tools but generates a Windows-layout Racket build.
In all cases, an in-place build includes (via links) a few packages that In all cases, an in-place build includes (via links) a few packages that
are in the `"pkgs"` directory. To get new versions of those packages, as are in the `"pkgs"` directory. To get new versions of those packages, as
well as the Racket core, then use `git pull`. Afterward, or to get new well as the Racket core, then use `git pull`. Afterward, or to get new
@ -222,28 +221,35 @@ Instructions: Building Racket
Pieces](#17-even-more-instructions-building-racket-pieces) further Pieces](#17-even-more-instructions-building-racket-pieces) further
below. below.
### 1.6. More Instructions: Building Racket on Chez Scheme ### 1.6. More Instructions: Building Racket CS and Racket BC
The `make cs` target (or `make cs-as-is` for a rebuild, or `nmake The default build of Racket, also known as Racket CS, uses and
win-cs` on Windows with Visual Studio) builds a variant of Racket that incorporates Chez Scheme. Chez Scheme sources are included in the Racket
runs on Chez Scheme. By default, the executables for the Racket CS repository.
variant all have a `cs` or `CS` suffix, and they coexist with a Racket
BC build by keeping compiled files in a machine-specific subdirectory of
the `"compiled"` directory. You can remove the `cs` suffix and the
subdirectory in `"compiled"` by providing `RACKETCS_SUFFIX=""` to
`make`. (One day, the default for `RACKETCS_SUFFIX` will change from
`"cs"` to `""`.)
Building Racket CS requires either an existing Racket or pb (portable Building Racket CS requires either an existing Racket or pb (portable
bytecode) boot files for Chez Scheme. By default, pb boot files are bytecode) boot files for Chez Scheme. By default, pb boot files are
downloaded from a separate Git repository by `make cs`. If you have downloaded from a separate Git repository by `make`. If you have Racket
Racket v7.1 or later, then you can choose instead to bootstrap using v7.1 or later, then you can choose instead to bootstrap using that
that Racket implementation with Racket implementation with
  `make cs RACKET=racket`   `make cs RACKET=racket`
The `make bc` target (or `make bc-as-is` for a rebuild, or `nmake
win-bc` on Windows with Visual Studio) builds an older variant of
Racket, called Racket BC, which does not use Chez Scheme. By default,
the executables for the Racket BC variant all have a `bc` or `BC`
suffix, and they coexist with a Racket CS build by keeping compiled
files in a `"bc"` subdirectory of the `"compiled"` directory. You can
remove the `bc` suffix and the subdirectory in `"compiled"` by providing
`RACKETBC_SUFFIX=""` to `make bc`.
Along similar lines, you can add a `cs` suffix to the Racket CS
executables and cause them to use a machine-specific subdirectopry of
`"compiled"` by providing `RACKETCS_SUFFIX="cs"` to `make` or `make cs`.
Use `make both` to build both Racket BC and Racket CS, where packages Use `make both` to build both Racket BC and Racket CS, where packages
are updated and documentation is built only once (using Racket BC). are updated and documentation is built only once (using Racket CS).
### 1.7. Even More Instructions: Building Racket Pieces ### 1.7. Even More Instructions: Building Racket Pieces

View File

@ -72,11 +72,11 @@ several options:
snapshots and releases are created, and you can create your own. snapshots and releases are created, and you can create your own.
See @secref["distribute"] for more instructions.} See @secref["distribute"] for more instructions.}
@item{@bold{In-place Racket on Chez Scheme build} --- This mode @item{@bold{In-place Racket BC build} --- This mode builds the old
builds using Chez Scheme via @exec{make cs}. Chez Scheme is itself Racket implementation (where ``BC'' means ``bytecode'' or ``before
built from a subtree of the Racket source repository. Final Chez Scheme''). Final executables with names that end in
executables with names that end in @litchar{cs} or @litchar{CS} are @litchar{bc} or @litchar{BC} are the Racket BC variants. See
the Racket on Chez Scheme variants.} @secref["build-cs"] for more information.}
] ]
@ -92,10 +92,6 @@ and 2019/16.0), @exec{nmake win} creates a build in the
command-line environment for Visual Studio, see command-line environment for Visual Studio, see
@filepath{racket/src/worksp/README.txt}. @filepath{racket/src/worksp/README.txt}.
On Windows with MinGW, use @exec{make PLAIN_RACKET=racket/racket},
since MinGW uses Unix-style tools but generates a Windows-layout
Racket build.
In all cases, an in-place build includes (via links) a few packages In all cases, an in-place build includes (via links) a few packages
that are in the @filepath{pkgs} directory. To get new versions of that are in the @filepath{pkgs} directory. To get new versions of
those packages, as well as the Racket core, then use @exec{git pull}. those packages, as well as the Racket core, then use @exec{git pull}.
@ -203,32 +199,38 @@ If you need even more control over the build, carry on to
@; ------------------------------------------------------------ @; ------------------------------------------------------------
@section[#:tag "build-cs"]{More Instructions: Building Racket on Chez Scheme} @section[#:tag "build-cs"]{More Instructions: Building Racket CS and Racket BC}
The @exec{make cs} target (or @exec{make cs-as-is} for a rebuild, or The default build of Racket, also known as Racket CS, uses and
@exec{nmake win-cs} on Windows with Visual Studio) builds a variant incorporates Chez Scheme. Chez Scheme sources are included in the
of Racket that runs on Chez Scheme. By default, the executables for Racket repository.
the Racket CS variant all have a @litchar{cs} or @litchar{CS}
suffix, and they coexist with a Racket BC build by keeping
compiled files in a machine-specific subdirectory of the
@filepath{compiled} directory. You can remove the @litchar{cs} suffix
and the subdirectory in @filepath{compiled} by providing
@exec{RACKETCS_SUFFIX=""} to @exec{make}. (One day,
the default for @exec{RACKETCS_SUFFIX} will change from @tt{"cs"} to
@tt{""}.)
Building Racket CS requires either an existing Racket or pb (portable Building Racket CS requires either an existing Racket or pb (portable
bytecode) boot files for Chez Scheme. By default, pb boot files are bytecode) boot files for Chez Scheme. By default, pb boot files are
downloaded from a separate Git repository by @exec{make cs}. If you downloaded from a separate Git repository by @exec{make}. If you have
have Racket v7.1 or later, then you can choose instead to bootstrap Racket v7.1 or later, then you can choose instead to bootstrap using
using that Racket implementation with that Racket implementation with
@commandline{make cs RACKET=racket} @commandline{make cs RACKET=racket}
The @exec{make bc} target (or @exec{make bc-as-is} for a rebuild, or
@exec{nmake win-bc} on Windows with Visual Studio) builds an older
variant of Racket, called Racket BC, which does not use Chez Scheme.
By default, the executables for the Racket BC variant all have a
@litchar{bc} or @litchar{BC} suffix, and they coexist with a Racket CS
build by keeping compiled files in a @filepath{bc} subdirectory of the
@filepath{compiled} directory. You can remove the @litchar{bc} suffix
and the subdirectory in @filepath{compiled} by providing
@exec{RACKETBC_SUFFIX=""} to @exec{make bc}.
Along similar lines, you can add a @litchar{cs} suffix to the Racket
CS executables and cause them to use a machine-specific subdirectopry
of @filepath{compiled} by providing @exec{RACKETCS_SUFFIX="cs"} to
@exec{make} or @exec{make cs}.
Use @exec{make both} to build both Racket BC and Racket CS, where Use @exec{make both} to build both Racket BC and Racket CS, where
packages are updated and documentation is built only once (using packages are updated and documentation is built only once (using
Racket BC). Racket CS).
@; ------------------------------------------------------------ @; ------------------------------------------------------------
@section[#:tag "even-more"]{Even More Instructions: Building Racket Pieces} @section[#:tag "even-more"]{Even More Instructions: Building Racket Pieces}

View File

@ -26,40 +26,19 @@ Report bugs:
======================================================================== ========================================================================
Racket BC (ByteCode / Before Chez) versus Racket CS (Chez Scheme) Racket CS (Chez Scheme) versus Racket BC (ByteCode / Before Chez)
======================================================================== ========================================================================
This source directory contains implementations for two different This source directory contains implementations for two different
versions of Racket: the original BC implementation that is versions of Racket: the original BC implementation that is
substantially implemented in C, and the CS implementation that builds substantially implemented in C, and the CS implementation that is
on Chez Scheme. implemented in Chez Scheme and Racket (compiled to Chez Scheme).
Racket BC
---------
By default, `configure` and the Windows scripts build the BC
implementation of Racket.
To build Racket BC on Windows, see See "worksp\README.txt" for
information.
If you need more information specific to Racket BC, see
"bc/README.txt".
Racket CS Racket CS
--------- ---------
To build Racket CS on Unix variants or Mac OS: By default, `configure` and the Windows scripts build the CS
implementation of Racket.
* ... in addition Racket BC: supply `--enable-cs` to `configure`.
The generated Racket CS executables will have a "cs" suffix. Also,
plain `make` will still build Racket BC with `--enable-cs`; use
`make cs` to build and `make install-cs` to install.
* ... by itself: supply `--enable-csdefault` to `configure`.
The generated Racket CS executables will *not* have a "cs" suffix.
Chez Scheme is included in Racket source distributions and the source Chez Scheme is included in Racket source distributions and the source
repository. repository.
@ -70,6 +49,29 @@ information.
If you need more information specific to Racket CS, see If you need more information specific to Racket CS, see
"cs/README.txt". "cs/README.txt".
Racket BC
---------
To build Racket BC on Unix variants or Mac OS:
* ... in addition Racket CS: supply `--enable-cs --enable-bc` to
`configure`.
The generated Racket BC executables will have a "bc" suffix. A
plain `make` will still build Racket CS; use `make bc` to build and
`make install-bc` to install.
* ... by itself: supply `--enable-bcdefault` to `configure`.
The generated Racket BC executables will *not* have a "bc" suffix.
To build Racket BC on Windows, see See "worksp\README.txt" for
information.
If you need more information specific to Racket BC, see
"bc/README.txt".
======================================================================== ========================================================================
Compiling for supported Unix variants (including Linux) Compiling for supported Unix variants (including Linux)
@ -87,7 +89,7 @@ Quick instructions:
make install make install
Those commands will create an in-place installation of Racket and Those commands will create an in-place installation of Racket and
store the results of C compilation in a separate "build" store the results of intermediate compilation in a separate "build"
subdirectory, which is useful if you need to update your sources, subdirectory, which is useful if you need to update your sources,
delete the build, and start from scratch. delete the build, and start from scratch.
@ -138,12 +140,12 @@ Detailed instructions:
2. From your build directory, run the script `configure` (which is in 2. From your build directory, run the script `configure` (which is in
the same directory as this README), with optional command-line the same directory as this README), with optional command-line
arguments `--prefix=TARGETDIR` or `--enable-shared` (or both). arguments like `--prefix=TARGETDIR`.
For example, if you want to install into "/usr/local/racket" using For example, if you want to install into "/usr/local/racket", then
dynamic libraries, then run: run:
[here]configure --prefix=/usr/local/racket --enable-shared [here]configure --prefix=/usr/local/racket
Again, "[here]" is the directory path containing the `configure` Again, "[here]" is the directory path containing the `configure`
script. If you follow the convention of running from a "build" script. If you follow the convention of running from a "build"
@ -198,8 +200,8 @@ Detailed instructions:
3. Run `make`. [As noted above, this might need to be GNU `make`.] 3. Run `make`. [As noted above, this might need to be GNU `make`.]
Executables and libraries are placed in subdirectories of the Executables and libraries are placed in subdirectories of the
build directory. For example, the `racket3m` executable appears in build directory. For example, the `racketcs` executable appears in
the "racket" directory. the "cs/c" directory.
You can run executables in-place before `make install`, but if you You can run executables in-place before `make install`, but if you
haven't yet built ".zo" bytecode files from Racket sources in haven't yet built ".zo" bytecode files from Racket sources in
@ -244,9 +246,9 @@ Detailed instructions:
may accumulate user- and version-specific information in your may accumulate user- and version-specific information in your
"add-ons" directory, which you can most easily find by evaluating "add-ons" directory, which you can most easily find by evaluating
(find-system-path 'addon-dir) (find-system-path 'addon-dir)
in Racket. In addition, if you configure with `--enabled-shared`, in Racket. In addition, on Mac OS or if you configure with
you may accumulate many unused versions of the dynamic libraries in `--enabled-shared` for Racket BC, you may accumulate many unused
your installation target. versions of the dynamic libraries in your installation target.
After an "in-place" install from a source distribution, the After an "in-place" install from a source distribution, the
"racket/src" directory is no longer needed, and it can be safely "racket/src" directory is no longer needed, and it can be safely
@ -351,13 +353,6 @@ Cross-compilation requires at least two flags to `configure`:
run `configure` again (with no arguments) in a "local" subdirectory run `configure` again (with no arguments) in a "local" subdirectory
to create a build for the current platform. to create a build for the current platform.
For Racket-on-Chez, an additional flag is needed:
* `--enable-scheme=SCHEME`, where SCHEME is a path to a Chez Scheme
build directory. Chez Scheme must be built there already for the
current platform, and a cross-compiled Chez Scheme will be created
in the same directory.
Some less commonly needed `configure` flags for Racket BC: Some less commonly needed `configure` flags for Racket BC:
* `--enable-stackup`, if the target platform`s stack grows up. * `--enable-stackup`, if the target platform`s stack grows up.
@ -440,6 +435,22 @@ of the `racket` executable (and variants), while "../collects"
contains the additional Racket libraries that are included in a contains the additional Racket libraries that are included in a
minimal Racket distribution. minimal Racket distribution.
Sources for the Racket CS implementation
----------------------------------------
* "cs" --- `racket` CS executable
* "thread" --- thread scheduler
* "io" --- I/O
This layer uses the "racketio" library to access OS facilties.
* "regexp" --- regexp matcher
See also the shared sources below, which includes rktio, the macro
expander, and schemify.
Sources for the Racket BC implementation Sources for the Racket BC implementation
------------------------------------------------- -------------------------------------------------
@ -462,22 +473,6 @@ Sources for the Racket BC implementation
See also the shared sources below, which includes rktio and the macro See also the shared sources below, which includes rktio and the macro
expander. expander.
Sources for the Racket CS implementation
----------------------------------------
* "cs" --- `racket` CS executable
* "thread" --- thread scheduler
* "io" --- I/O
This layer uses the "racketio" library to access OS facilties.
* "regexp" --- regexp matcher
See also the shared sources below, which includes rktio, the macro
expander, and schemify.
Sources shared by both Racket implementations Sources shared by both Racket implementations
--------------------------------------------- ---------------------------------------------

View File

@ -1,4 +1,4 @@
The implementation of Racket on Chez Scheme (Racket CS) in this The implementation of Racket CS (Racket on Chez Scheme) in this
directory is organized into two layers: directory is organized into two layers:
* The immediate directory contains Scheme sources to implement Racket * The immediate directory contains Scheme sources to implement Racket
@ -12,9 +12,14 @@ directory is organized into two layers:
======================================================================== ========================================================================
Requirements Bootstrapping
======================================================================== ========================================================================
The Racket source distribution includes already-bootstrapped files to
build Racket CS. Some of those files are checked into the Racket Git
rrepository, and the rest are in a sibling "pb" repository that that
Racket repository's top-level makefile checks out.
Building Racket CS from original sources requires an existing Racket Building Racket CS from original sources requires an existing Racket
build: build:
@ -22,27 +27,27 @@ build:
but any recent version of Racket (v7.1 and up) can generate boot but any recent version of Racket (v7.1 and up) can generate boot
files for Chez Scheme. files for Chez Scheme.
Currently, when you use `configure --enable-cs` or similar as When you use `configure` as described in "../README.txt", supply
described in "../README.txt", then a bootstrapping variant of `--enable-racket=...` to select a Racket implementation to build
Racket BC is built automatically and the used to build Racket CS Racket CS boot files. That implementation could be one that is
boot files. You can select a different Racket excutable by built by first using `configure --enable-bc`.
supplying `--enable-racket=...` to `configure`.
Alternatively, boot files for the pb (portable bytecode) Chez Alternatively, boot files for the pb (portable bytecode) Chez
Scheme variant can be used to compile Chez Scheme on any supported Scheme variant can be used to compile Chez Scheme on any supported
platform. The pb boot files must correspond to practically the same platform. The pb boot files must correspond to practically the same
version of Chez Scheme as being built, though. version of Chez Scheme as being built, though. The should be
installed in the "../ChezScheme/boot/pb" directory as described by
"../ChezScheme/BUILDING".
* Racket is needed to generate the files in the "../bootstrapped" * Racket is needed to generate the files in the "schemified"
directory from the sources in sibling directories like "io". The directory from the sources in sibling directories like "../io". The
Racket version must be practically the same as the current Racket Racket version must be practically the same as the current Racket
verson, although it can be the Racket BC implementation (instead of verson, although it can be the Racket BC implementation (instead of
the Racket CS implementation). the Racket CS implementation).
Unlike Chez Scheme boot files, the files generated in Unlike Chez Scheme boot files, the files generated in "schemified"
"../bootstrapped" are human-readable and -editable Scheme code. are human-readable and -editable Scheme code. That possibilities
That possibilities provides a way out of bootstrapping black holes, provides a way out of bootstrapping black holes, even without BC.
even without BC.
======================================================================== ========================================================================
@ -51,9 +56,9 @@ build:
The Racket CS implementation can be built and run in two different The Racket CS implementation can be built and run in two different
ways: development mode for running directly using a Chez Scheme ways: development mode for running directly using a Chez Scheme
installation, and build mode for creating a `racket` or `racketcs` installation, and build mode for creating a `racket` executable that
executable that combines Chez Scheme and Racket functionality into a combines Chez Scheme and Racket functionality into a single
single executable. executable.
Development Mode Development Mode
---------------- ----------------
@ -101,33 +106,18 @@ However, you can use them directly with something like
where [here] is the directory containing this "README.txt" and [build] where [here] is the directory containing this "README.txt" and [build]
is a build directory (usually "../build" relative to [here]). is a build directory (usually "../build" relative to [here]).
The `configure` script accepts flags like `--enable-racket=...` and The resulting Racket CS executable is named "racket" by default. To
`--enable-scheme=...` to select an existing Racket and a Chez Scheme generate an executable with a "cs" suffix, supply `--enable-bcdefault`
build directory to use for building Racket CS: to `configure` (which means that the name "racket" should be reserved
for Racket BC). The option to select the presence or absence of "cs"
* By default, the build uses Racket as "[build]/racket/racket3m" and also affects the location of ".zo" files, where they are written to a
bootstraps bytecode from "[here]/../../collects". subdirectory of "compiled" if a "cs" suffix is used.
If you supply `--enable-racket=...` to specify a Racket executable,
then it must be part of a (minimal) installation.
* By default, the build looks for a Chez Scheme build directory as
"build/ChezScheme".
Building Racket CS requires a Chez Scheme build directory, not just
a Chez Scheme installation that is accessible as `scheme`.
The resulting Racket CS executable has the suffix "cs" by default. To
generate an executable without the "cs" suffix, supply
`--enable-csdefault` to `configure`. The option to select the presence
or absence of "cs" also affects the location of ".zo" files.
Compilation on Windows does not use the `configure` script in "c". Compilation on Windows does not use the `configure` script in "c".
Instead, from the directory "[here]\..\worksp", run "csbuild.rkt" Instead, from the directory "[here]\..\worksp", run "csbuild.rkt"
using an installed (minimal) Racket --- perhaps one created by running using an installed (minimal) Racket --- perhaps one created by running
"[here]\..\build.bat". The "csbuild.rkt" script puts intermediate "[here]\..\build.bat". The "csbuild.rkt" script puts some intermediate
files in "[here]\..\build", including a Chez Scheme checkout if it's files in "[here]\..\build".
not already present (in which case `git` must be available).
======================================================================== ========================================================================
@ -144,9 +134,9 @@ Racket CS currently supports three compilation modes:
Select this mode by setting the `PLT_CS_MACH` environment variable, Select this mode by setting the `PLT_CS_MACH` environment variable,
but it's currently the default. but it's currently the default.
In development mode or when the "cs" suffix is used for build mode, When the "cs" suffix is used for build mode, compiled ".zo" files
compiled ".zo" files in this mode are written to a subdirectory of in this mode are written to a subdirectory of "compiled" using the
"compiled" using the Chez Scheme platform name (e.g., "ta6osx"). Chez Scheme platform name (e.g., "ta6osx").
Set `PLT_CS_COMPILE_LIMIT` to set the maximum size of forms to Set `PLT_CS_COMPILE_LIMIT` to set the maximum size of forms to
compile before falling back to interpreted "bytecode". The default compile before falling back to interpreted "bytecode". The default
@ -163,9 +153,8 @@ Racket CS currently supports three compilation modes:
At the linklet API level, this mode implements the 'quick option to At the linklet API level, this mode implements the 'quick option to
`compile-linklet` and similar functions. `compile-linklet` and similar functions.
In development mode or when the "cs" suffix is used for build mode, When the "cs" suffix is used for build mode, compiled ".zo" files
compiled ".zo" files in this mode are written to a "cs" in this mode are written to a "cs" subdirectory of "compiled".
subdirectory of "compiled".
Interpreter mode is used automatically for large modules in Interpreter mode is used automatically for large modules in
machine-code mode, as controlled by `PLT_CS_COMPILE_LIMIT`. It is machine-code mode, as controlled by `PLT_CS_COMPILE_LIMIT`. It is
@ -177,16 +166,14 @@ Racket CS currently supports three compilation modes:
Select this mode by setting the `PLT_CS_JIT` environment variable. Select this mode by setting the `PLT_CS_JIT` environment variable.
In development mode or when the "cs" suffix is used for build mode, When the "cs" suffix is used for build mode, compiled ".zo" files
compiled ".zo" files in this mode are written to a "cs" in this mode are written to a "cs" subdirectory of "compiled".
subdirectory of "compiled".
In development mode or when the "cs" suffix is used for build mode, Set the `PLT_ZO_PATH` environment variable to override the path used
set the `PLT_ZO_PATH` environment variable to override the path used
for ".zo" files. For example, you may want to preserve a normal build for ".zo" files. For example, you may want to preserve a normal build
while also building in machine-code mode with `PLT_CS_DEBUG` set, in while also building in machine-code mode with `PLT_CS_DEBUG` set, in
which case setting `PLT_ZO_PATH` to something like "ta6osx-debug" could which case setting `PLT_ZO_PATH` to something like "compiled/debug"
be a good idea. could be a good idea.
======================================================================== ========================================================================
@ -275,7 +262,7 @@ Files in this directory:
For example, "../thread" contains the implementation (in For example, "../thread" contains the implementation (in
Racket) of the thread and event subsystem. Racket) of the thread and event subsystem.
compiled/*.scm (generated) - A conversion from a ".rktl" file to be schemified/*.scm (generated) - A conversion from a ".rktl" file to be
`included`d into an ".sls" library. `included`d into an ".sls" library.
../build/so-rktio/rktio.rktl (generated) and ../build/so-rktio/rktio.rktl (generated) and

View File

@ -130,19 +130,20 @@
(ptr-add #f (#%string->number gracket-guid-or-x11-args 16)))))) (ptr-add #f (#%string->number gracket-guid-or-x11-args 16))))))
(define compiled-file-paths (define compiled-file-paths
(list (->path (cond (list (cond
[cs-compiled-subdir? [(getenv-bytes "PLT_ZO_PATH")
(build-path "compiled" => (lambda (s)
(cond (unless (and (not (equal? s #vu8()))
[(getenv-bytes "PLT_ZO_PATH") (relative-path? (->path s)))
=> (lambda (s) (error 'racket "PLT_ZO_PATH environment variable is not a valid path"))
(unless (and (not (equal? s #vu8())) (->path s))]
(relative-path? (->path s))) [cs-compiled-subdir?
(error 'racket "PLT_ZO_PATH environment variable is not a valid path")) (build-path "compiled"
(->path s))] (->path
[platform-independent-zo-mode? "cs"] (cond
[else (symbol->string (machine-type))]))] [platform-independent-zo-mode? "cs"]
[else "compiled"])))) [else (symbol->string (machine-type))])))]
[else "compiled"])))
(define user-specific-search-paths? #t) (define user-specific-search-paths? #t)
(define load-on-demand? #t) (define load-on-demand? #t)
(define compile-target-machine (if (getenv "PLT_COMPILE_ANY") (define compile-target-machine (if (getenv "PLT_COMPILE_ANY")

View File

@ -28,21 +28,6 @@ work, but will not actually change any environment variables.
After you have Visual Studio command-line tools set up, then you can After you have Visual Studio command-line tools set up, then you can
build either the Racket BC or Racket CS implementations (or both). build either the Racket BC or Racket CS implementations (or both).
Racket BC
---------
Build the Racket BC implementation using
build.bat
The result is "..\..\Racket.exe", DLLs and "GRacket.exe" in
"..\..\lib", and other files in "..\..\lib", "..\..\etc", etc.
A "..\..\RacketCGC.exe" executable and associated DLLs are built in
the process of building "..\..\Racket.exe".
See also "Completing the Build" below.
Racket CS Racket CS
--------- ---------
@ -50,35 +35,51 @@ Build the Racket CS implementation using
build-cs.bat build-cs.bat
which builds "..\..\Racket3m.exe" to bootstrap the build, because the which builds "..\..\RacketBC.exe" to bootstrap the build, because the
main build script is implemented in Racket. main build script is implemented in Racket.
To instead build using an existing Racket installation (version 7.1 or To instead build using an existing Racket installation (version 7.1 or
later), use later), use
racket.exe csbuild.rkt --racketcs-suffix "" racket.exe csbuild.rkt
The result is "..\..\Racket.exe", DLLs and "GRacket.exe" in The result is "..\..\Racket.exe", DLLs and "GRacket.exe" in
"..\..\lib", and other files in "..\..\lib", "..\..\etc", etc. "..\..\lib", and other files in "..\..\lib", "..\..\etc", etc.
Many intermediate files will be put in "../build". Many intermediate files will be put in "../build".
To add a "CS" suffix to the generated executables, call "csbuild.rkt"
with `--racketcs-suffix "CS"`.
See also "Completing the Build" below.
Racket BC
---------
Build the Racket BC implementation using
build.bat
The result is "..\..\RacketBC.exe", DLLs and "GRacketBC.exe" in
"..\..\lib", and other files in "..\..\lib", "..\..\etc", etc.
A "..\..\RacketCGC.exe" executable and associated DLLs are built in
the process of building "..\..\RacketBC.exe".
To avoid the "BC" suffix, set the `UNDERSCORE_BC_SUFFIX` environment
variable to `_` before running "build.bat".
See also "Completing the Build" below. See also "Completing the Build" below.
Both Racket BC and Racket CS Both Racket BC and Racket CS
---------------------------- ----------------------------
When using "csbuild.rkt" directly, omit the `--racketcs-suffix ""` A Racket BC build with a "BC" suffix is also configured to read and
arguments to create "..\..\RacketCS.exe" executable instead of bytecode in a "bc" subdirectory of "compiled". COnsequently, a
"..\..\Racket.exe". A build with a "CS" suffix is also configured to "RacketBC.exe" build can coexist with a CS build as "Racket.exe". So,
read and bytecode in a subdirectory of "compiled" as described in the sequence
"..\cs\README.txt".
A "CS" suffix and using a subdirectory of "compiled" means that a
Racket CS build as "RacketCS.exe" can coexist with a BC build as
"Racket.exe". So, the sequence
build.bat build.bat
..\..\Racket.exe csbuild.rkt ..\..\RacketBC.exe csbuild.rkt
builds both. builds both.

View File

@ -3,9 +3,6 @@ set BUILD_CONFIG=%2
set BUILD_LEVEL=%3 set BUILD_LEVEL=%3
set UNDERSCORE_BC_SUFFIX=%4 set UNDERSCORE_BC_SUFFIX=%4
if "%UNDERSCORE_BC_SUFFIX%"=="_bc" set BC_SUFFIX=BC
if "%UNDERSCORE_BC_SUFFIX%"=="_" set BC_SUFFIX=
set PLT_SETUP_OPTIONS=--no-foreign-libs set PLT_SETUP_OPTIONS=--no-foreign-libs
:suloop :suloop
if "%5"=="" goto sudone if "%5"=="" goto sudone

View File

@ -12,6 +12,12 @@ cl genvsx.c
genvsx.exe genvsx.exe
if errorlevel 1 (set PLTSLNVER=X) if errorlevel 1 (set PLTSLNVER=X)
REM Default is to add a BC suffix
if "%UNDERSCORE_BC_SUFFIX%"=="" set UNDERSCORE_BC_SUFFIX=_bc
if "%UNDERSCORE_BC_SUFFIX%"=="_bc" set BC_SUFFIX=BC
if "%UNDERSCORE_BC_SUFFIX%"=="_" set BC_SUFFIX=
echo #define COMPILED_PATH_AS_%BC_SUFFIX% > bc_suffix_new.h echo #define COMPILED_PATH_AS_%BC_SUFFIX% > bc_suffix_new.h
fc bc_suffix.h bc_suffix_new.h fc bc_suffix.h bc_suffix_new.h
if errorlevel 1 (copy bc_suffix_new.h bc_suffix.h) if errorlevel 1 (copy bc_suffix_new.h bc_suffix.h)

View File

@ -16,7 +16,7 @@
(define machine (if (= 32 (system-type 'word)) (define machine (if (= 32 (system-type 'word))
"ti3nt" "ti3nt"
"ta6nt")) "ta6nt"))
(define cs-suffix "CS") (define cs-suffix "")
(define boot-mode "--chain") (define boot-mode "--chain")
(define extra-repos-base #f) (define extra-repos-base #f)
(define git-clone-args '()) (define git-clone-args '())