Build Defines and Environment Variables ======================================= Build #defines -------------- DEFAULT_CPU The default target CPU architecture when not explicitly specified. If this #define is absent, an attempt is made to auto-detect it at compile time. NO_HOST_TARGET If defined, a target CPU architecture must always be specified when running the compiler (instead of using DEFAULT_CPU or the auto-detected host CPU). This is useful to support running the compiler on platforms that it cannot target. NO_GETTEXT Don't use gettext. I.e. don't support translation of messages. NO_GETPWUID Don't try to use getpwuid as a fallback when neither $XDG_DATA_HOME or $HOME is set. NO_DEFAULT_IFACEDIRS Only search the main slul-interfaces directory from the makefile variable "slulinterfacesdir". ARENA_SIZE Allocation chunk size for the arena allocator. Default: 4096 bytes PARSEBUFFER Parse chunk size. Default: 4096 bytes (increase to 64kB?) Debugging #defines ------------------ FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION Enables fuzzing mode (for running the compiler in a fuzzer). Currently, it disables filesystem modification, and adds a call to abort() on internal compiler errors. CSLUL_NO_STDIO_MOCKS Allow filesystem modification even in fuzzing mode (FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) SLUL_DEBUG Enables bug-finding code. Currently, it enables to features: 1. Tree nodes get initialized with non-zero data, to detect uninitialized pointers. 2. Type-confusion of structs is enabled by tracking the type in a "trailer" field as well as in a separate array, and comparing them at de-allocation. CSBE_TRAP_ON_ERROR Causes the backend (CSBE) to immediately trap when an error occurs. When this is NOT set, the backend will return an error to the frontend, which will show a rather useless "Internal compiler error" message. Makefile options ---------------- srcdir Path to the root of the source tree, if building in a separate directory. Please run "make outdirs", in this case, before running any other commands. DESTDIR Used for creating packages. Specifies a path that everything is installed to, instead of the root file system. prefix Overrides the installation prefix. The default value is /usr/local exec_prefix, bindir, datarootdir, datadir, docdir, htmldir, libdir, includedir, slulinterfacesdir, localedir, mandir, man1dir, man1ext Overrides specific installation directories and file extensions. multiarch Uses a multiarch subdirectory when installing library files. For example: aarch64-linux-gnu. Used on Debian based systems. multilib_suffix Adds a numeric suffix to libdir, e.g. 32 or 64. INSTALL, INSTALL_DIR, INSTALL_PROGRAM, INSTALL_DATA, MKDIR_P, RM, RM_F Overrides system commands used by the makefiles. CFLAGS Compiler flags. CSLUL_LIBS Additional flags, for libraries for example, to pass to the final compilation step. For example, to use libintl on BSD, specify: CSLUL_LIBS=-lintl Makefile options for development -------------------------------- UNITTEST_OPTS Build options to pass to the unittest. Can be -v for verbose, or -q for quiet. CPPCHECK_OPTS Options to pass to cppcheck. For example --check-config GCC_FANALYZER_OPTS Options to pass to `gcc -fanalyzer` when running `make gcc-analyze` VALGRIND_OPTS Options to pass to Valgrind. For example, --vgdb-error=1 to stop when there's an error and wait for a debugger to connect. FUZZ_INPUT_DIR Overrides the directory with input test cases when fuzzing with afl++ FUZZ_FLAGS_AFL Additional flags to afl++. For example, "-p fast" to use the power schedule "fast", and "-d" to use the fast non-deterministic mode.