-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathmhs.conf.in
More file actions
83 lines (72 loc) · 2.33 KB
/
Copy pathmhs.conf.in
File metadata and controls
83 lines (72 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
-- 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 %GMPFLAGS"
cclibs = "%GMPLIBS -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 %GMPFLAGS"
cclibs = "%GMPLIBS -lm"
conf = "unix"
-- As above, but with the non-portable flag -march=native
[unix_x86]
cc = "cc"
ccflags = "-w -Wall -O3 -flto -march=native %GMPFLAGS"
cclibs = "%GMPLIBS -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 -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"