update build guide and READMEs for CS as default
This commit is contained in:
parent
e6752e9afc
commit
2885df0347
50
build.md
50
build.md
|
@ -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.4 Quick Instructions: Unix-Style Install](#14-quick-instructions-unix-style-install)
|
||||
>> [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.1 Building Minimal Racket](#171-building-minimal-racket)
|
||||
>>> [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
|
||||
Variants](#2-distributing-racket-variants) for more instructions.
|
||||
|
||||
* **In-place Racket on Chez Scheme build** — This mode builds using Chez
|
||||
Scheme via `make cs`. Chez Scheme is itself built from a subtree of
|
||||
the Racket source repository. Final executables with names that end in
|
||||
`cs` or `CS` are the Racket on Chez Scheme variants.
|
||||
* **In-place Racket BC build** — This mode builds the old Racket
|
||||
implementation (where “BC” means “bytecode” or “before Chez Scheme”).
|
||||
Final executables with names that end in `bc` or `BC` are the Racket
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
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
|
||||
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
|
||||
|
@ -222,28 +221,35 @@ Instructions: Building Racket
|
|||
Pieces](#17-even-more-instructions-building-racket-pieces) further
|
||||
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
|
||||
win-cs` on Windows with Visual Studio) builds a variant of Racket that
|
||||
runs on Chez Scheme. By default, the executables for the Racket CS
|
||||
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 `""`.)
|
||||
The default build of Racket, also known as Racket CS, uses and
|
||||
incorporates Chez Scheme. Chez Scheme sources are included in the Racket
|
||||
repository.
|
||||
|
||||
Building Racket CS requires either an existing Racket or pb (portable
|
||||
bytecode) boot files for Chez Scheme. By default, pb boot files are
|
||||
downloaded from a separate Git repository by `make cs`. If you have
|
||||
Racket v7.1 or later, then you can choose instead to bootstrap using
|
||||
that Racket implementation with
|
||||
downloaded from a separate Git repository by `make`. If you have Racket
|
||||
v7.1 or later, then you can choose instead to bootstrap using that
|
||||
Racket implementation with
|
||||
|
||||
`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
|
||||
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
|
||||
|
||||
|
|
|
@ -72,11 +72,11 @@ several options:
|
|||
snapshots and releases are created, and you can create your own.
|
||||
See @secref["distribute"] for more instructions.}
|
||||
|
||||
@item{@bold{In-place Racket on Chez Scheme build} --- This mode
|
||||
builds using Chez Scheme via @exec{make cs}. Chez Scheme is itself
|
||||
built from a subtree of the Racket source repository. Final
|
||||
executables with names that end in @litchar{cs} or @litchar{CS} are
|
||||
the Racket on Chez Scheme variants.}
|
||||
@item{@bold{In-place Racket BC build} --- This mode builds the old
|
||||
Racket implementation (where ``BC'' means ``bytecode'' or ``before
|
||||
Chez Scheme''). Final executables with names that end in
|
||||
@litchar{bc} or @litchar{BC} are the Racket BC variants. See
|
||||
@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
|
||||
@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
|
||||
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}.
|
||||
|
@ -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
|
||||
@exec{nmake win-cs} on Windows with Visual Studio) builds a variant
|
||||
of Racket that runs on Chez Scheme. By default, the executables for
|
||||
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{""}.)
|
||||
The default build of Racket, also known as Racket CS, uses and
|
||||
incorporates Chez Scheme. Chez Scheme sources are included in the
|
||||
Racket repository.
|
||||
|
||||
Building Racket CS requires either an existing Racket or pb (portable
|
||||
bytecode) boot files for Chez Scheme. By default, pb boot files are
|
||||
downloaded from a separate Git repository by @exec{make cs}. If you
|
||||
have Racket v7.1 or later, then you can choose instead to bootstrap
|
||||
using that Racket implementation with
|
||||
downloaded from a separate Git repository by @exec{make}. If you have
|
||||
Racket v7.1 or later, then you can choose instead to bootstrap using
|
||||
that Racket implementation with
|
||||
|
||||
@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
|
||||
packages are updated and documentation is built only once (using
|
||||
Racket BC).
|
||||
|
||||
Racket CS).
|
||||
|
||||
@; ------------------------------------------------------------
|
||||
@section[#:tag "even-more"]{Even More Instructions: Building Racket Pieces}
|
||||
|
|
|
@ -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
|
||||
versions of Racket: the original BC implementation that is
|
||||
substantially implemented in C, and the CS implementation that builds
|
||||
on 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".
|
||||
substantially implemented in C, and the CS implementation that is
|
||||
implemented in Chez Scheme and Racket (compiled to Chez Scheme).
|
||||
|
||||
Racket CS
|
||||
---------
|
||||
|
||||
To build Racket CS on Unix variants or Mac OS:
|
||||
|
||||
* ... 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.
|
||||
By default, `configure` and the Windows scripts build the CS
|
||||
implementation of Racket.
|
||||
|
||||
Chez Scheme is included in Racket source distributions and the source
|
||||
repository.
|
||||
|
@ -70,6 +49,29 @@ information.
|
|||
If you need more information specific to Racket CS, see
|
||||
"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)
|
||||
|
@ -87,7 +89,7 @@ Quick instructions:
|
|||
make install
|
||||
|
||||
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,
|
||||
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
|
||||
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
|
||||
dynamic libraries, then run:
|
||||
For example, if you want to install into "/usr/local/racket", then
|
||||
run:
|
||||
|
||||
[here]configure --prefix=/usr/local/racket --enable-shared
|
||||
[here]configure --prefix=/usr/local/racket
|
||||
|
||||
Again, "[here]" is the directory path containing the `configure`
|
||||
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`.]
|
||||
|
||||
Executables and libraries are placed in subdirectories of the
|
||||
build directory. For example, the `racket3m` executable appears in
|
||||
the "racket" directory.
|
||||
build directory. For example, the `racketcs` executable appears in
|
||||
the "cs/c" directory.
|
||||
|
||||
You can run executables in-place before `make install`, but if you
|
||||
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
|
||||
"add-ons" directory, which you can most easily find by evaluating
|
||||
(find-system-path 'addon-dir)
|
||||
in Racket. In addition, if you configure with `--enabled-shared`,
|
||||
you may accumulate many unused versions of the dynamic libraries in
|
||||
your installation target.
|
||||
in Racket. In addition, on Mac OS or if you configure with
|
||||
`--enabled-shared` for Racket BC, you may accumulate many unused
|
||||
versions of the dynamic libraries in your installation target.
|
||||
|
||||
After an "in-place" install from a source distribution, the
|
||||
"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
|
||||
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:
|
||||
|
||||
* `--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
|
||||
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
|
||||
-------------------------------------------------
|
||||
|
||||
|
@ -462,22 +473,6 @@ Sources for the Racket BC implementation
|
|||
See also the shared sources below, which includes rktio and the macro
|
||||
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
|
||||
---------------------------------------------
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
* 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
|
||||
build:
|
||||
|
||||
|
@ -22,27 +27,27 @@ build:
|
|||
but any recent version of Racket (v7.1 and up) can generate boot
|
||||
files for Chez Scheme.
|
||||
|
||||
Currently, when you use `configure --enable-cs` or similar as
|
||||
described in "../README.txt", then a bootstrapping variant of
|
||||
Racket BC is built automatically and the used to build Racket CS
|
||||
boot files. You can select a different Racket excutable by
|
||||
supplying `--enable-racket=...` to `configure`.
|
||||
When you use `configure` as described in "../README.txt", supply
|
||||
`--enable-racket=...` to select a Racket implementation to build
|
||||
Racket CS boot files. That implementation could be one that is
|
||||
built by first using `configure --enable-bc`.
|
||||
|
||||
Alternatively, boot files for the pb (portable bytecode) Chez
|
||||
Scheme variant can be used to compile Chez Scheme on any supported
|
||||
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"
|
||||
directory from the sources in sibling directories like "io". The
|
||||
* Racket is needed to generate the files in the "schemified"
|
||||
directory from the sources in sibling directories like "../io". The
|
||||
Racket version must be practically the same as the current Racket
|
||||
verson, although it can be the Racket BC implementation (instead of
|
||||
the Racket CS implementation).
|
||||
|
||||
Unlike Chez Scheme boot files, the files generated in
|
||||
"../bootstrapped" are human-readable and -editable Scheme code.
|
||||
That possibilities provides a way out of bootstrapping black holes,
|
||||
even without BC.
|
||||
Unlike Chez Scheme boot files, the files generated in "schemified"
|
||||
are human-readable and -editable Scheme code. That possibilities
|
||||
provides a way out of bootstrapping black holes, even without BC.
|
||||
|
||||
|
||||
========================================================================
|
||||
|
@ -51,9 +56,9 @@ build:
|
|||
|
||||
The Racket CS implementation can be built and run in two different
|
||||
ways: development mode for running directly using a Chez Scheme
|
||||
installation, and build mode for creating a `racket` or `racketcs`
|
||||
executable that combines Chez Scheme and Racket functionality into a
|
||||
single executable.
|
||||
installation, and build mode for creating a `racket` executable that
|
||||
combines Chez Scheme and Racket functionality into a single
|
||||
executable.
|
||||
|
||||
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]
|
||||
is a build directory (usually "../build" relative to [here]).
|
||||
|
||||
The `configure` script accepts flags like `--enable-racket=...` and
|
||||
`--enable-scheme=...` to select an existing Racket and a Chez Scheme
|
||||
build directory to use for building Racket CS:
|
||||
|
||||
* By default, the build uses Racket as "[build]/racket/racket3m" and
|
||||
bootstraps bytecode from "[here]/../../collects".
|
||||
|
||||
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.
|
||||
The resulting Racket CS executable is named "racket" by default. To
|
||||
generate an executable with a "cs" suffix, supply `--enable-bcdefault`
|
||||
to `configure` (which means that the name "racket" should be reserved
|
||||
for Racket BC). The option to select the presence or absence of "cs"
|
||||
also affects the location of ".zo" files, where they are written to a
|
||||
subdirectory of "compiled" if a "cs" suffix is used.
|
||||
|
||||
Compilation on Windows does not use the `configure` script in "c".
|
||||
Instead, from the directory "[here]\..\worksp", run "csbuild.rkt"
|
||||
using an installed (minimal) Racket --- perhaps one created by running
|
||||
"[here]\..\build.bat". The "csbuild.rkt" script puts intermediate
|
||||
files in "[here]\..\build", including a Chez Scheme checkout if it's
|
||||
not already present (in which case `git` must be available).
|
||||
"[here]\..\build.bat". The "csbuild.rkt" script puts some intermediate
|
||||
files in "[here]\..\build".
|
||||
|
||||
|
||||
========================================================================
|
||||
|
@ -144,9 +134,9 @@ Racket CS currently supports three compilation modes:
|
|||
Select this mode by setting the `PLT_CS_MACH` environment variable,
|
||||
but it's currently the default.
|
||||
|
||||
In development mode or when the "cs" suffix is used for build mode,
|
||||
compiled ".zo" files in this mode are written to a subdirectory of
|
||||
"compiled" using the Chez Scheme platform name (e.g., "ta6osx").
|
||||
When the "cs" suffix is used for build mode, compiled ".zo" files
|
||||
in this mode are written to a subdirectory of "compiled" using the
|
||||
Chez Scheme platform name (e.g., "ta6osx").
|
||||
|
||||
Set `PLT_CS_COMPILE_LIMIT` to set the maximum size of forms to
|
||||
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
|
||||
`compile-linklet` and similar functions.
|
||||
|
||||
In development mode or when the "cs" suffix is used for build mode,
|
||||
compiled ".zo" files in this mode are written to a "cs"
|
||||
subdirectory of "compiled".
|
||||
When the "cs" suffix is used for build mode, compiled ".zo" files
|
||||
in this mode are written to a "cs" subdirectory of "compiled".
|
||||
|
||||
Interpreter mode is used automatically for large modules in
|
||||
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.
|
||||
|
||||
In development mode or when the "cs" suffix is used for build mode,
|
||||
compiled ".zo" files in this mode are written to a "cs"
|
||||
subdirectory of "compiled".
|
||||
When the "cs" suffix is used for build mode, compiled ".zo" files
|
||||
in this mode are written to a "cs" 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
|
||||
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
|
||||
be a good idea.
|
||||
which case setting `PLT_ZO_PATH` to something like "compiled/debug"
|
||||
could be a good idea.
|
||||
|
||||
|
||||
========================================================================
|
||||
|
@ -275,7 +262,7 @@ Files in this directory:
|
|||
For example, "../thread" contains the implementation (in
|
||||
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.
|
||||
|
||||
../build/so-rktio/rktio.rktl (generated) and
|
||||
|
|
|
@ -130,19 +130,20 @@
|
|||
(ptr-add #f (#%string->number gracket-guid-or-x11-args 16))))))
|
||||
|
||||
(define compiled-file-paths
|
||||
(list (->path (cond
|
||||
[cs-compiled-subdir?
|
||||
(build-path "compiled"
|
||||
(cond
|
||||
[(getenv-bytes "PLT_ZO_PATH")
|
||||
=> (lambda (s)
|
||||
(unless (and (not (equal? s #vu8()))
|
||||
(relative-path? (->path s)))
|
||||
(error 'racket "PLT_ZO_PATH environment variable is not a valid path"))
|
||||
(->path s))]
|
||||
[platform-independent-zo-mode? "cs"]
|
||||
[else (symbol->string (machine-type))]))]
|
||||
[else "compiled"]))))
|
||||
(list (cond
|
||||
[(getenv-bytes "PLT_ZO_PATH")
|
||||
=> (lambda (s)
|
||||
(unless (and (not (equal? s #vu8()))
|
||||
(relative-path? (->path s)))
|
||||
(error 'racket "PLT_ZO_PATH environment variable is not a valid path"))
|
||||
(->path s))]
|
||||
[cs-compiled-subdir?
|
||||
(build-path "compiled"
|
||||
(->path
|
||||
(cond
|
||||
[platform-independent-zo-mode? "cs"]
|
||||
[else (symbol->string (machine-type))])))]
|
||||
[else "compiled"])))
|
||||
(define user-specific-search-paths? #t)
|
||||
(define load-on-demand? #t)
|
||||
(define compile-target-machine (if (getenv "PLT_COMPILE_ANY")
|
||||
|
|
|
@ -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
|
||||
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
|
||||
---------
|
||||
|
||||
|
@ -50,35 +35,51 @@ Build the Racket CS implementation using
|
|||
|
||||
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.
|
||||
|
||||
To instead build using an existing Racket installation (version 7.1 or
|
||||
later), use
|
||||
|
||||
racket.exe csbuild.rkt --racketcs-suffix ""
|
||||
racket.exe csbuild.rkt
|
||||
|
||||
The result is "..\..\Racket.exe", DLLs and "GRacket.exe" in
|
||||
"..\..\lib", and other files in "..\..\lib", "..\..\etc", etc.
|
||||
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.
|
||||
|
||||
Both Racket BC and Racket CS
|
||||
----------------------------
|
||||
|
||||
When using "csbuild.rkt" directly, omit the `--racketcs-suffix ""`
|
||||
arguments to create "..\..\RacketCS.exe" executable instead of
|
||||
"..\..\Racket.exe". A build with a "CS" suffix is also configured to
|
||||
read and bytecode in a subdirectory of "compiled" as described in
|
||||
"..\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
|
||||
A Racket BC build with a "BC" suffix is also configured to read and
|
||||
bytecode in a "bc" subdirectory of "compiled". COnsequently, a
|
||||
"RacketBC.exe" build can coexist with a CS build as "Racket.exe". So,
|
||||
the sequence
|
||||
|
||||
build.bat
|
||||
..\..\Racket.exe csbuild.rkt
|
||||
..\..\RacketBC.exe csbuild.rkt
|
||||
|
||||
builds both.
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@ set BUILD_CONFIG=%2
|
|||
set BUILD_LEVEL=%3
|
||||
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
|
||||
:suloop
|
||||
if "%5"=="" goto sudone
|
||||
|
|
|
@ -12,6 +12,12 @@ cl genvsx.c
|
|||
genvsx.exe
|
||||
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
|
||||
fc bc_suffix.h bc_suffix_new.h
|
||||
if errorlevel 1 (copy bc_suffix_new.h bc_suffix.h)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
(define machine (if (= 32 (system-type 'word))
|
||||
"ti3nt"
|
||||
"ta6nt"))
|
||||
(define cs-suffix "CS")
|
||||
(define cs-suffix "")
|
||||
(define boot-mode "--chain")
|
||||
(define extra-repos-base #f)
|
||||
(define git-clone-args '())
|
||||
|
|
Loading…
Reference in New Issue
Block a user