advopt.txt 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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:on|off output to stdout
  21. --colors:on|off turn compiler messages coloring on|off
  22. --listFullPaths:on|off 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:on|off compile Nim files only; do not assemble or link
  42. --noLinking:on|off compile Nim and generated files but do not link
  43. --noMain:on|off do not generate a main procedure
  44. --genScript:on|off generate a compile script (in the 'nimcache'
  45. subdirectory named 'compile_$$project$$scriptext'),
  46. implies --compileOnly
  47. --genDeps:on|off 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:on|off 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. --project document the whole project (doc2)
  58. --docSeeSrcUrl:url activate 'see source' for doc and doc2 commands
  59. (see doc.item.seesrc in config/nimdoc.cfg)
  60. --docInternal also generate documentation for non-exported symbols
  61. --lineDir:on|off generation of #line directive on|off
  62. --embedsrc:on|off embeds the original source code as comments
  63. in the generated output
  64. --threadanalysis:on|off turn thread analysis on|off
  65. --tlsEmulation:on|off turn thread local storage emulation on|off
  66. --taintMode:on|off turn taint mode on|off
  67. --implicitStatic:on|off turn implicit compile time evaluation on|off
  68. --patterns:on|off turn pattern matching on|off
  69. --memTracker:on|off turn memory tracker on|off
  70. --hotCodeReloading:on|off
  71. turn support for hot code reloading on|off
  72. --excessiveStackTrace:on|off
  73. stack traces use full file paths
  74. --oldNewlines:on|off turn on|off the old behaviour of "\n"
  75. --laxStrings:on|off when turned on, accessing the zero terminator in
  76. strings is allowed; only for backwards compatibility
  77. --nilseqs:on|off allow 'nil' for strings/seqs for
  78. backwards compatibility
  79. --oldast:on|off use old AST for backwards compatibility
  80. --skipCfg:on|off do not read the nim installation's configuration file
  81. --skipUserCfg:on|off do not read the user's configuration file
  82. --skipParentCfg:on|off do not read the parent dirs' configuration files
  83. --skipProjCfg:on|off do not read the project's configuration file
  84. --gc:refc|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
  101. disables the effects of the dynlib pragma
  102. --listCmd list the commands used to execute external programs
  103. --parallelBuild:0|1|... perform a parallel build
  104. value = number of processors (0 for auto-detect)
  105. --incremental:on|off only recompile the changed modules (experimental!)
  106. --verbosity:0|1|2|3 set Nim's verbosity level (1 is default)
  107. --errorMax:N stop compilation after N errors; 0 means unlimited
  108. --experimental:$1
  109. enable experimental language feature
  110. -v, --version show detailed version information
  111. --profiler:on|off Enable profiling; requires `import nimprof`, and
  112. works better with `--stackTrace:on`
  113. see also https://nim-lang.github.io/Nim/estp.html