1 Compilation
(require dynext/compile) | package: dynext-lib |
procedure
(compile-extension quiet? input-file output-file include-dirs) → any/c quiet? : any/c input-file : path-string? output-file : path-string? include-dirs : (listof path-string?)
1.1 Compilation Parameters
parameter
(current-extension-compiler compiler) → void? compiler : (or/c path-string? false/c)
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.
parameter
→
(listof (or/c path-string? (-> (or/c null? (listof string?))))) (current-extension-compiler-flags flags) → void?
flags :
(listof (or/c path-string? (-> (or/c null? (listof string?)))))
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.
parameter
→ (-> path-string? (listof string?)) (current-make-compile-include-strings proc) → void? proc : (-> path-string? (listof string?))
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.
parameter
→ (-> (or/c string? path?) (listof string?)) (current-make-compile-input-strings proc) → void? proc : (-> (or/c string? path?) (listof string?))
parameter
→ (-> (or/c string? path?) (listof string?)) (current-make-compile-output-strings proc) → void? proc : (-> (or/c string? path?) (listof string?))
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").
parameter
→ (listof (or/c string? path? (-> (or/c string? path?)))) (current-extension-preprocess-flags flags) → void? flags : (listof (or/c string? path? (-> (or/c string? path?))))
The defaults are similar to current-extension-compiler-flags, but with "/E" (Windows "cl.exe") or "-E" and without non-"-D" flags.
parameter
(compile-variant) → (one-of/c 'normal 'cgc '3m)
(compile-variant variant-symbol) → void? variant-symbol : (one-of/c 'normal 'cgc '3m)
1.2 Helper functions
procedure
(use-standard-compiler name) → any
name : (apply one-of/c (get-standard-compilers))
Unix: 'cc or 'gcc
Windows: 'gcc, 'msvc, or 'borland
MacOS: 'cw
procedure
1.3 Signature
(require dynext/compile-sig) | package: dynext-lib |
signature
dynext:compile^ : signature
Includes everything exported by the dynext/compile module.
1.4 Unit
(require dynext/compile-unit) | package: dynext-lib |
value