summary refs log tree commit diff stats
path: root/doc/nimc.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/nimc.rst')
-rw-r--r--doc/nimc.rst27
1 files changed, 26 insertions, 1 deletions
diff --git a/doc/nimc.rst b/doc/nimc.rst
index 5d9ed03ab..e949df69c 100644
--- a/doc/nimc.rst
+++ b/doc/nimc.rst
@@ -189,12 +189,28 @@ resides in its own directory so that the generated ``nimcache`` directory
 is not shared between different projects.
 
 
+Compiler Selection
+==================
+
+To change the compiler from the default compiler (at the command line)::
+
+  nim c --cc:llvm_gcc --compile_only myfile.nim
+
+This uses the configuration defined in ``config\nim.cfg`` for ``lvm_gcc``.
+
+If nimcache already contains compiled code from a different compiler for the same project,
+add the ``-f`` flag to force all files to be recompiled.
+
+The default compiler is defined at the top of ``config\nim.cfg``.  Changing this setting
+affects the compiler used by ``koch`` to (re)build Nim.
+
+
 Cross compilation
 =================
 
 To cross compile, use for example::
 
-  nim c --cpu:i386 --os:linux --compile_only --gen_script myproject.nim
+  nim c --cpu:i386 --os:linux --compileOnly --genScript myproject.nim
 
 Then move the C code and the compile script ``compile_myproject.sh`` to your
 Linux i386 machine and run the script.
@@ -262,6 +278,15 @@ Define               Effect
                      what's in the Nim file with what's in the C header
                      (requires a C compiler with _Static_assert support, like
                      any C11 compiler)
+``tempDir``          This symbol takes a string as its value, like 
+                     ``--define:tempDir:/some/temp/path`` to override the
+                     temporary directory returned by ``os.getTempDir()``.
+                     The value **should** end with a directory separator 
+                     character. (Relevant for the Android platform)
+``useShPath``        This symbol takes a string as its value, like 
+                     ``--define:useShPath:/opt/sh/bin/sh`` to override the
+                     path for the ``sh`` binary, in cases where it is not
+                     located in the default location ``/bin/sh``
 ==================   =========================================================