4.5 C Tools
The C-tool procedures provided by zuo/c accept a tool configuration hash table to describe a C compiler, linker, archiver, and associated flags. When potential configuration is missing, a default suitable for the current toolchain is used, where the toolchain is determined through (hash-ref (runtime-env) 'toolchain-type). Values in a tool configuration hash table are shell-command fragments, not individual arguments. For example, it could make sense to configure 'CC as "libtool cc", which would run libtool in compilation mode, instead of trying to run a compile whose executable name includes a space.
The following keys are recognized in a tool configuration:
'CC: a C compiler
'CPPFLAGS: C preprocessor flags
'CFLAGS: C compilation and linking flags
'LDFLAGS: C linker flags
'LIBS: additional C libraries
'AR: library archiver
'ARFLAGS: library archiver flags
procedure
.o : path-string? .c : path-string? config : hash? (c-compile out ins config) → void? out : path-string? ins : (listof path-string?) config : hash?
procedure
.exe : path-string? ins : (listof path-string?) config : hash?
procedure
.a : path-string? ins : (listof path-string?) config : hash?
procedure
(.c->.o .c) → path-string?
.c : path-string?
procedure
(.exe name) → path-string?
name : path-string?
procedure
(.a name) → path-string?
name : path-string?
procedure
(config-merge config key shell-str) → hash?
config : hash? key : symbol? shell-str : string?
procedure
(config-include config path ...) → hash?
config : hash? path : path-string?
procedure
(config-define config def ...) → hash?
config : hash? def : string?