-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.nims
25 lines (21 loc) · 1.07 KB
/
config.nims
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
when defined(emscripten):
# This path will only run if -d:emscripten is passed to nim.
--nimcache:tmp # Store intermediate files close by in the ./tmp dir.
--os:linux # Emscripten pretends to be linux.
--cpu:i386 # Emscripten is 32bits.
--cc:clang # Emscripten is very close to clang, so we ill replace it.
when defined(windows):
--clang.exe:emcc.bat # Replace C
--clang.linkerexe:emcc.bat # Replace C linker
--clang.cpp.exe:emcc.bat # Replace C++
--clang.cpp.linkerexe:emcc.bat # Replace C++ linker.
else:
--clang.exe:emcc # Replace C
--clang.linkerexe:emcc # Replace C linker
--clang.cpp.exe:emcc # Replace C++
--clang.cpp.linkerexe:emcc # Replace C++ linker.
--listCmd # List what commands we are running so that we can debug them.
--gc:arc # GC:arc is friendlier with crazy platforms.
--exceptions:goto # Goto exceptions are friendlier with crazy platforms.
# Pass this to Emscripten linker to generate html file scaffold for us.
switch("passL", "-o tests/web/index.html -s USE_WEBGL2=1 --shell-file tests/web/shell_minimal.html")