1 Compilation
Compiles the given input file (C source) to the given output file (a
compiled-object file). The quiet? argument indicates whether
command should be echoed to the current output port. The
include-dirs argument is a list of directories to search for
include files; the Racket installation’s "include"
directories are added automatically.
1.1 Compilation Parameters
A parameter that determines the executable for the compiler.
The default is set by searching for an executable using the
PATH environment variable, or using the CC or
MZSCHEME_DYNEXT_COMPILER environment variable if either is
defined (and the latter takes precedence). On Windows, the search
looks for "cl.exe", then "gcc.exe", then
"bcc32.exe" (Borland). On Unix, it looks for
"gcc", then "cc". A #f value indicates that
no compiler could be found.
On Windows, the default is (list "/c" "/O2" "/MT" 3m-flag-thunk) for "cl.exe", or (list "-c" "-O2" "-fPIC" 3m-flag-thunk) for "gcc.exe" and
"bcc32.exe", where 3m-flag-thunk returns
(list "-DMZ_PRECISE_GC") for the 3m variant and null for the
CGC variant. On Unix, the default is usually (list "-c" "-O2" "-fPIC" 3m-flag-thunk). If the CFLAGS or
MZSCHEME_DYNEXT_COMPILER_FLAGS environment variable is
defined (the latter takes precedence), then its value is parsed as a
list of strings that is appended before the defaults.
A parameter the processes include-path inputs to the compiler; the
parameter values takes an include directory path and returns a list of
strings for the command line.
On Windows, the default converts "dir" to (list "/Idir") for "cl.exe", (list "-Idir") for
"gcc.exe" and "bcc32.exe". On Unix, the default
converts "dir" to (list "-Idir"). If the
CFLAGS environment variable is defined, then its value is
parsed as a list of flags that is appended before the defaults.
A parameter that processes inputs to the compiler; the parameter’s
values takes an input file path and returns a list of strings for the
command line. The default is
list.
A parameter that processes outputs specified for the compiler; the
parameter’s value takes an output file path and returns a list of
strings for the command line.
On Windows, the default converts "file" to (list "/Fofile") for "cl.exe", or to (list "-o" "file")
for "gcc.exe" and "bcc32.exe". On Unix, the
default converts "file" to (list "-o" "file").
A parameters that specifies flags to the compiler preprocessor,
instead of to the compiler proper; use these flags for preprocessing
instead of
current-extension-compiler-flags.
The defaults are similar to current-extension-compiler-flags,
but with "/E" (Windows "cl.exe") or "-E"
and without non-"-D" flags.
A parameter that indicates the target for compilation, where
'normal is an alias for the result of
(system-type 'gc)1.2 Helper functions
Sets the parameters described in
Compilation Parameters for a
particular known compiler. The acceptable names are
platforms-specific:
Takes a list of paths and thunks and returns a list of strings. Each
thunk in the input list is applied to get a list of strings that is
inlined in the corresponding position in the output list. This
expansion enables occasional parametrization of flag lists, etc.,
depending on the current compile variant.
1.3 Signature
Includes everything exported by the dynext/compile module.
1.4 Unit