makefiles: enable ".boot" files in non-cross CS builds on Windows

There's a trade-off between keeping the distribution sizes small and
making ".boot" files available for convenient embedding, even though
embedding is relatively rare. For Unix platforms, since you have to
build from source to get a static library for embedding anyway, we'll
leave out ".boot" files. For Mac OS, the distribution's "Racket"
framework includes ".boot" files --- even though the framework is
itself unused for a normal distribution build, since signing and
notarization are handled by embedded the boot files in an executable,
but the framework was kept for a kind of backward compatibility. For
Windows, the Racket DLL can be used for embedding, so the ".boot"
files would be the only missing piece; also, they were already
included in a cross-built distribution.

Update "Inside" to note that ".boot" files must be built on Unix and
to clarify the location of ".boot" files on Mac OS.

Closes #3377
This commit is contained in:
Matthew Flatt 2020-09-03 07:22:04 -06:00
parent 3f0631116a
commit b9e4b5dbb1
2 changed files with 11 additions and 7 deletions

View File

@ -72,11 +72,14 @@ To embed Racket CS in a program, follow these steps:
The @filepath{petite.boot}, @filepath{scheme.boot}, and
@filepath{racket.boot} files are distributed with the Racket
software in the installation's @filepath{lib} directory. These files
can be combined into a single file---or even embedded into the
executable---as long as the @cpp{boot1_offset}, @cpp{boot2_offset},
and @cpp{boot3_offset} fields of @cpp{racket_boot_arguments_t} are
set to identify the starting offset of each boot image in the file.
software in the installation's @filepath{lib} directory for Windows,
and they are distributed within the @filepath{Racket} framework on
Mac OS X; they must be @seclink["src-build"]{built} from source on Unix.
These files can be combined into a single file---or even
embedded into the executable---as long as the @cpp{boot1_offset},
@cpp{boot2_offset}, and @cpp{boot3_offset} fields of
@cpp{racket_boot_arguments_t} are set to identify the starting
offset of each boot image in the file.
See @secref["segment-ideas"] for advice on embedding files like
@filepath{petite.boot} in an executable.}

View File

@ -13,6 +13,7 @@
(define scheme-dir (build-path 'up "ChezScheme"))
(define pull? #f)
(define static-libs? #t)
(define install-boot? #t) ; currently always enabled
(define machine (if (= 32 (system-type 'word))
"ti3nt"
"ta6nt"))
@ -34,7 +35,7 @@
[("--extra-repos-base") url "Clone repos from <url>ChezScheme/.git, etc."
(unless (equal? url "")
(set! extra-repos-base url))]
[("--disable-libs") "Disable installaton of non-embedded boot files"
[("--disable-libs") "Disable installaton of static libraries (currently ignored)"
(set! static-libs? #f)]
#:args
clone-arg
@ -295,7 +296,7 @@
machine
"machine")
(when static-libs?
(when install-boot?
(bootstrap-racket! "../cs/c/add-terminator.rkt"
"../build/petite-v.boot"
"../../lib/petite.boot")