Skip to content

Commit

Permalink
changed build settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Mar 24, 2024
1 parent 47c7d95 commit 31951e6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
5 changes: 5 additions & 0 deletions absytree.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ task buildDesktop, "Build the desktop version":
# selfExec fmt"c --passL:advapi32.lib -o:ast{exe} -d:exposeScriptingApi {getCommandLineParams()} ./src/absytree.nim"
# selfExec fmt"c -o:ast{exe} -d:exposeScriptingApi --objChecks:off --fieldChecks:off --rangeChecks:off --boundChecks:off --overflowChecks:off --floatChecks:off --nanChecks:off --infChecks:off {getCommandLineParams()} ./src/absytree.nim"

task buildDesktopDebug, "Build the desktop version (debug)":
selfExec fmt"c -o:ast{exe} -d:exposeScriptingApi --stackTrace:on --lineTrace:on --debuginfo --passC:-std=gnu11 {getCommandLineParams()} ./src/absytree.nim"
# selfExec fmt"c --passL:advapi32.lib -o:ast{exe} -d:exposeScriptingApi {getCommandLineParams()} ./src/absytree.nim"
# selfExec fmt"c -o:ast{exe} -d:exposeScriptingApi --objChecks:off --fieldChecks:off --rangeChecks:off --boundChecks:off --overflowChecks:off --floatChecks:off --nanChecks:off --infChecks:off {getCommandLineParams()} ./src/absytree.nim"

task buildDesktopWindows, "Build the desktop version for windows":
selfExec fmt"c -o:ast{exe} {crossCompileWinArgs} -d:exposeScriptingApi {getCommandLineParams()} ./src/absytree.nim"

Expand Down
56 changes: 26 additions & 30 deletions config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,42 @@ switch("path", "src")
switch("d", "mingw")
switch("mm", "orc")
switch("tlsEmulation", "off")
switch("d", "ssl")


# performance
switch("panics", "on")
switch("d", "release")


# checks
# --objChecks:off
# --fieldChecks:off
# --boundChecks:off
# --overflowChecks:off
# --floatChecks:off
# --nanChecks:off
# --infChecks:off

# --rangeChecks:off # this causes issues on js backend with some prng initialization


# required for actual builds, but for lsp this should be off to improve performance because it doesn't need to generate as many functions
# switch("d", "exposeScriptingApi")

switch("d", "enableGui=true")
switch("d", "enableTerminal=true")
switch("d", "ssl")
switch("d", "exposeScriptingApi")


# uncomment to see logs in the console
switch("d", "allowConsoleLogger")


switch("d", "wasm3HasWasi")
switch("d", "wasm3VerboseErrorMessages")
switch("panics", "on")


# switches for debugging

# switch("d", "wasm3EnableStrace2")
# switch("d", "wasm3RecordBacktraces")
# switch("d", "wasm3LogModule")
Expand All @@ -34,33 +55,8 @@ switch("panics", "on")
# switch("d", "nimTypeNames")


# checks

# --objChecks:off
# --fieldChecks:off
# --boundChecks:off
# --overflowChecks:off
# --floatChecks:off
# --nanChecks:off
# --infChecks:off

# --rangeChecks:off # this causes issues on js backend with some prng initialization
switch("nimcache", "nimcache")

# switch("cc", "vcc")
# switch("nimcache", "D:/nc")
# switch("nimcache", "nimcache")
# switch("nimcache", "C:/nimcache")

case 0
of 0:
switch("d", "release")
of 1:
switch("d", "release")
switch("stackTrace", "on")
switch("lineTrace", "on")
switch("debuginfo", "on")
else:
discard

# begin Nimble config (version 2)
--noNimblePath
Expand Down

0 comments on commit 31951e6

Please sign in to comment.