You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nim.nim 644B

123456789101112131415161718192021222324252627
  1. from macros import error
  2. switch "styleCheck", "hint"
  3. proc setCompiler(s: string) =
  4. let c = findExe s
  5. if c.len == 0:
  6. error s & " binary wasn't found in $PATH."
  7. switch "gcc.exe", c
  8. switch "gcc.linkerexe", c
  9. when defined(win):
  10. setCompiler "x86_64-w64-mingw32-gcc"
  11. switch "gcc.options.linker", ""
  12. switch "os", "windows"
  13. switch "define", "windows"
  14. when defined(musl):
  15. setCompiler "x86_64-linux-musl-gcc"
  16. switch "passL", "-static"
  17. when defined(release):
  18. switch "nimcache", "/tmp/nim/" & projectName() & "/r"
  19. switch "passC", "-flto"
  20. switch "passL", "-s"
  21. else:
  22. switch "nimcache", "/tmp/nim/" & projectName() & "/d"