advopt.txt 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. Advanced commands:
  2. //compileToC, cc compile project with C code generator
  3. //compileToCpp, cpp compile project to C++ code
  4. //compileToOC, objc compile project to Objective C code
  5. //js compile project to Javascript
  6. //e run a Nimscript file
  7. //rst2html convert a reStructuredText file to HTML
  8. //rst2tex convert a reStructuredText file to TeX
  9. //jsondoc extract the documentation to a json file
  10. //ctags create a tags file
  11. //buildIndex build an index for the whole documentation
  12. //run run the project (with Tiny C backend; buggy!)
  13. //genDepend generate a DOT file containing the
  14. module dependency graph
  15. //dump dump all defined conditionals and search paths
  16. see also: --dump.format:json (useful with: ` | jq`)
  17. //check checks the project for syntax and semantic
  18. Advanced options:
  19. -o:FILE, --out:FILE set the output filename
  20. --stdout output to stdout
  21. --colors:on|off turn compiler messages coloring on|off
  22. --listFullPaths list full paths in messages
  23. -w:on|off|list, --warnings:on|off|list
  24. turn all warnings on|off or list all available
  25. --warning[X]:on|off turn specific warning X on|off
  26. --hints:on|off|list turn all hints on|off or list all available
  27. --hint[X]:on|off turn specific hint X on|off
  28. --styleCheck:off|hint|error
  29. produce hints or errors for Nim identifiers that
  30. do not adhere to Nim's official style guide
  31. https://nim-lang.org/docs/nep1.html
  32. --showAllMismatches:on|off
  33. show all mismatching candidates in overloading
  34. resolution
  35. --lib:PATH set the system library path
  36. --import:PATH add an automatically imported module
  37. --include:PATH add an automatically included module
  38. --nimcache:PATH set the path used for generated files
  39. --header:FILE the compiler should produce a .h file (FILE
  40. is optional)
  41. -c, --compileOnly compile Nim files only; do not assemble or link
  42. --noLinking compile Nim and generated files but do not link
  43. --noMain do not generate a main procedure
  44. --genScript generate a compile script (in the 'nimcache'
  45. subdirectory named 'compile_$$project$$scriptext'),
  46. implies --compileOnly
  47. --genDeps generate a '.deps' file containing the dependencies
  48. --os:SYMBOL set the target operating system (cross-compilation)
  49. --cpu:SYMBOL set the target processor (cross-compilation)
  50. --debuginfo enables debug information
  51. -t, --passC:OPTION pass an option to the C compiler
  52. -l, --passL:OPTION pass an option to the linker
  53. --cincludes:DIR modify the C compiler header search path
  54. --clibdir:DIR modify the linker library search path
  55. --clib:LIBNAME link an additional C library
  56. (you should omit platform-specific extensions)
  57. --genMapping generate a mapping file containing
  58. (Nim, mangled) identifier pairs
  59. --project document the whole project (doc2)
  60. --docSeeSrcUrl:url activate 'see source' for doc and doc2 commands
  61. (see doc.item.seesrc in config/nimdoc.cfg)
  62. --lineDir:on|off generation of #line directive on|off
  63. --embedsrc embeds the original source code as comments
  64. in the generated output
  65. --threadanalysis:on|off turn thread analysis on|off
  66. --tlsEmulation:on|off turn thread local storage emulation on|off
  67. --taintMode:on|off turn taint mode on|off
  68. --implicitStatic:on|off turn implicit compile time evaluation on|off
  69. --patterns:on|off turn pattern matching on|off
  70. --memTracker:on|off turn memory tracker on|off
  71. --hotCodeReloading:on|off
  72. turn support for hot code reloading on|off
  73. --excessiveStackTrace:on|off
  74. stack traces use full file paths
  75. --oldNewlines:on|off turn on|off the old behaviour of "\n"
  76. --laxStrings:on|off when turned on, accessing the zero terminator in
  77. strings is allowed; only for backwards compatibility
  78. --nilseqs:on|off allow 'nil' for strings/seqs for
  79. backwards compatibility
  80. --skipCfg do not read the general configuration file
  81. --skipUserCfg do not read the user's configuration file
  82. --skipParentCfg do not read the parent dirs' configuration files
  83. --skipProjCfg do not read the project's configuration file
  84. --gc:refc|v2|markAndSweep|boehm|go|none|regions
  85. select the GC to use; default is 'refc'
  86. --index:on|off turn index file generation on|off
  87. --putenv:key=value set an environment variable
  88. --NimblePath:PATH add a path for Nimble support
  89. --noNimblePath deactivate the Nimble path
  90. --noCppExceptions use default exception handling with C++ backend
  91. --cppCompileToNamespace:namespace
  92. use the provided namespace for the generated C++ code,
  93. if no namespace is provided "Nim" will be used
  94. --excludePath:PATH exclude a path from the list of search paths
  95. --dynlibOverride:SYMBOL marks SYMBOL so that dynlib:SYMBOL
  96. has no effect and can be statically linked instead;
  97. symbol matching is fuzzy so
  98. that --dynlibOverride:lua matches
  99. dynlib: "liblua.so.3"
  100. --dynlibOverrideAll makes the dynlib pragma have no effect
  101. --listCmd list the commands used to execute external programs
  102. --parallelBuild:0|1|... perform a parallel build
  103. value = number of processors (0 for auto-detect)
  104. --incremental:on|off only recompile the changed modules (experimental!)
  105. --verbosity:0|1|2|3 set Nim's verbosity level (1 is default)
  106. --errorMax:N stop compilation after N errors; 0 means unlimited
  107. --experimental:$1
  108. enable experimental language feature
  109. -v, --version show detailed version information