MicroHs-0.16.0.0: mhs.conf
-- mhs keys
-- packageDbPath package lookup path
-- The path is expanded from the environment.
-- $MHSPKG is always the package directory relative
-- to the mhs binary, and $VERSION is the compiler version.
[mhs]
packageDbPath = "$MHSPKG:$HOME/.mcabal-user/mhs-$VERSION"
-- Target keys
-- cc C compiler to use, default "cc"
-- ccflags flags to pass at the beginning of the compiler command, default ""
-- cclibs flags to pass at the end of the compilation command, default ""
-- conf the config directory to use, default "unix"
-- cout flag to set the output file to cc, default "-o"
-- If no target is set, we use 'unix' on non-Windows and 'windows' on Windows.
-- Typical Unix-like flags
-- Assumes gcc or clang
[unix]
cc = "cc"
ccflags = "-w -Wall -O3 "
cclibs = " -lm"
conf = "unix"
-- As above, but with -flto
-- This flag improves performance, but generates a warning with gcc.
[unix_lto]
cc = "cc"
ccflags = "-w -Wall -O3 -flto "
cclibs = " -lm"
conf = "unix"
-- As above, but with the non-portable flag -march=native
[unix_x86]
cc = "cc"
ccflags = "-w -Wall -O3 -flto -march=native "
cclibs = " -lm"
conf = "unix"
-- Compile with debugging instead of optimization
[debug]
cc = "cc"
ccflags = "-w -Wall -g"
cclibs = "-lm"
conf = "unix"
-- Generate JavaScript&Wasm
[emscripten]
cc = "emcc"
ccflags = "-O3 -sEXPORTED_RUNTIME_METHODS=stringToNewUTF8 -sALLOW_MEMORY_GROWTH -sTOTAL_STACK=5MB -sNODERAWFS -sSINGLE_FILE -DUSE_SYSTEM_RAW -sEXIT_RUNTIME -Wno-address-of-packed-member"
cclibs = "-lm"
conf = "unix"
-- Generate JavaScript&Wasm, with xterm.js support
[emscripten_web]
cc = "emcc"
ccflags = "-O3 -sASYNCIFY -sEXPORTED_FUNCTIONS=['_main','_set_input_char'] -sEXPORTED_RUNTIME_METHODS=['FS','ccall'] -sFORCE_FILESYSTEM=1 -sALLOW_MEMORY_GROWTH -sTOTAL_STACK=5MB -sSINGLE_FILE -DUSE_WEB_INPUT -Wno-address-of-packed-member"
cclibs = "-lm"
conf = "unix"
-- Use the Tiny C Compiler
[tcc]
cc = "tcc"
ccflags = "-D__TCC__=1"
cclibs = "-lm"
conf = "unix"
-- Windows flags, with stdout supressed
[windows]
cc = "cl > NUL /nologo"
ccflags = "-O2"
cclibs = ""
conf = "windows"
cout = "-Fe"
-- Take all flags from environment variables
[environment]
-- Get all values from the environment
cc = "$CC"
ccflags = "$MHSCCFLAGS"
cclibs = "$MHSCCLIBS"
conf = "$MHSCONF"