raco demod: report that it works only on BC

Closes #3706
This commit is contained in:
Matthew Flatt 2021-03-07 07:48:50 -07:00
parent 81e0c86fc3
commit 727cd1ca9f
2 changed files with 10 additions and 6 deletions

View File

@ -16,7 +16,10 @@
(garbage-collect-toplevels-enabled #t)]
[("-r" "--recompile") "Recompile final module to re-run optimizations"
(recompile-enabled #t)]
#:args (filename)
#:args (filename)
(unless (eq? 'racket (system-type 'vm))
(raise-user-error (format "~a: supported only on Racket BC"
(short-program+command-name))))
(demodularize filename (output-file))))
(module test racket/base)

View File

@ -3,10 +3,11 @@
@title[#:tag "demod"]{@exec{raco demod}: Demodularizing Programs}
The @exec{raco demod} command takes a Racket module and flattens
all of its dependencies into a single compiled module.
A file @filepath{@nonterm{name}.rkt} is demodularized into
The @exec{raco demod} command, which works only for Racket @tech[#:doc
guide-doc]{BC}, takes a Racket module and flattens all of its
dependencies into a single compiled module. A file
@filepath{@nonterm{name}.rkt} is demodularized into
@filepath{@nonterm{name}_rkt_merged.zo}.
The demodularized zo file can be run by passing it as an argument to
the @exec{racket} command-line program.
The demodularized @filepath{.zo} file can be run by passing it as an
argument to the @exec{racket} command-line program.