Janet 1.36.0-c0d7a49 Documentation
(Other Versions:
1.35.0
1.34.0
1.31.0
1.29.1
1.28.0
1.27.0
1.26.0
1.25.1
1.24.0
1.23.0
1.22.0
1.21.0
1.20.0
1.19.0
1.18.1
1.17.1
1.16.1
1.15.0
1.13.1
1.12.2
1.11.1
1.10.1
1.9.1
1.8.1
1.7.0
1.6.0
1.5.1
1.5.0
1.4.0
1.3.1
)
C Compiler Wrapper
Index
cc/*ar* cc/*build-dir* cc/*build-type* cc/*c++* cc/*c++-std* cc/*c++flags* cc/*c-std* cc/*cc* cc/*cflags* cc/*defines* cc/*dynamic-libs* cc/*lflags* cc/*libs* cc/*msvc-libs* cc/*pkg-config-flags* cc/*smart-libs* cc/*static-libs* cc/*target-os* cc/*use-rdynamic* cc/*use-rpath* cc/*visit* cc/check-library-exists cc/compile-and-link-executable cc/compile-and-link-shared cc/compile-and-make-archive cc/compile-c cc/compile-c++ cc/link-executable-c cc/link-executable-c++ cc/link-shared-c cc/link-shared-c++ cc/load-settings cc/make-archive cc/msvc-compile-and-link-executable cc/msvc-compile-and-link-shared cc/msvc-compile-and-make-archive cc/msvc-compile-c cc/msvc-compile-c++ cc/msvc-link-executable cc/msvc-link-shared cc/msvc-make-archive cc/pkg-config cc/save-settings cc/search-dynamic-libraries cc/search-libraries cc/search-static-libraries cc/visit-clean cc/visit-do-nothing cc/visit-execute cc/visit-execute-if-stale cc/visit-execute-quiet cc/visit-generate-makefile
Presets for compiler optimizations, can be :release, :develop, and :debug, defaults to :develop.
C++ standard to use as a 2 digit number, defaults to 11 on GCC-like compilers, 14 on msvc.
C standard to use as a 2 digit number, defaults to 99 on GCC-like compilers, 11 on msvc.
List of libraries to use when compiling - can be static or dynamic depending on system.
Try to resolve circular or out-of-order dependencies between libraries by using --start-group and --end-group. Some linkers support this by default, but not at all. Defaults to true on linux and macos.
Operating system to assume is being used for target compiler toolchain
Optional setting to enable using `-rdynamic` or `-Wl,-export_dynamic` when linking executables. This is the preferred way on POSIX systems to let an executable load native modules dynamically at runtime. Defaults to true
Optional setting to enable using `(dyn *syspath*)` as the runtime path to load for Shared Objects. Defaults to true
(check-library-exists libname &opt binding test-source-code) Check if a library exists on the current POSIX system. Will run a test compilation and return true if the compilation succeeds.
(compile-and-link-executable to & sources) Compile and link an executable C/C++ program. Return an array of commands.
(compile-and-link-shared to & sources) Compile and link a shared C/C++ library. Return an array of commands.
(compile-and-make-archive to & sources) Compile and create a static archive. Return an array of commands.
(compile-c from to) Compile a C program to an object file. Return the command arguments.
(compile-c++ from to) Compile a C++ program to an object file. Return the command arguments.
(link-executable-c objects to) Link a C program to make an executable. Return the command arguments.
(link-executable-c++ objects to) Link a C++ program to make an executable. Return the command arguments.
(link-shared-c objects to) Link a C program to make a shared library. Return the command arguments.
(link-shared-c++ objects to) Link a C++ program to make a shared library. Return the command arguments.
(load-settings settings) Load settings from a snapshot of settings saved with `save-settings`.
(make-archive objects to) Make an archive file. Return the command arguments.
(msvc-compile-and-link-executable to & sources) Compile and link an executable C/C++ program. Return an array of commands.
(msvc-compile-and-link-shared to & sources) Compile and link a shared C/C++ library. Return an array of commands.
(msvc-compile-and-make-archive to & sources) Compile and create a static archive. Return an array of commands.
(msvc-compile-c from to) Compile a C program with MSVC. Return the command arguments.
(msvc-compile-c++ from to) Compile a C++ program with MSVC. Return the command arguments.
(msvc-link-executable objects to) Link a C/C++ program with MSVC to make an executable. Return the command arguments.
(msvc-link-shared objects to) Link a C/C++ program with MSVC to make a shared library. Return the command arguments.
(msvc-make-archive objects to) Make an archive file with MSVC. Return the command arguments.
(pkg-config & pkg-config-libraries) Setup defines, cflags, and library flags from pkg-config.
(save-settings) Get a snapshot of the current settings for various compiler flags, libraries, defines, etc. that can be loaded later.
(search-dynamic-libraries & libs) Search for dynamic libraries on the current POSIX system and configure `(dyn *dynamic-libraries*)`. This is done by checking for the existence of libraries with `check-library-exists`. Returns an array of libraries that were not found.
(search-libraries & libs) Search for libraries on the current POSIX system and configure `(dyn *libs*)`. This is done by checking for the existence of libraries with `check-library-exists`. Returns an array of libraries that were not found.
(search-static-libraries & libs) Search for static libraries on the current POSIX system and configure `(dyn *static-libs*)`. This is done by checking for the existence of libraries with `check-library-exists`. Returns an array of libraries that were not found.
(visit-clean cmd inputs outputs message) A visiting function that will remove all outputs.
(visit-do-nothing &) A visiting function that has no side effects and therefor does nothing.
(visit-execute cmd inputs outputs message) A function that can be provided as `(dyn *visit*)` that will execute commands.
(visit-execute-if-stale cmd inputs outputs message) A function that can be provided as `(dyn *visit*)` that will execute a command if inputs are newer than outputs, providing a simple, single-threaded, incremental build tool. This is not optimal for parallel builds, but is simple and works well for small projects.
(visit-execute-quiet cmd inputs outputs message) A function that can be provided as `(dyn *visit*)` that will execute commands quietly.
(visit-generate-makefile cmd inputs outputs message) A function that can be provided as `(dyn *visit*)` that will generate Makefile targets.