Skip to content

Commit

Permalink
Syntax (RST) fix Internals of the Compiler
Browse files Browse the repository at this point in the history
'Rebuilding the Compiler' and a few other sections required syntax fixes:
* new lines before and after lists to fix rendering
* use internal reference instead of Markdown style link
* use double backticks (back-quotes) for embedded quoted code & commands
  • Loading branch information
saem committed Dec 13, 2020
1 parent 5514b29 commit 28d101e
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions doc/intern.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,24 @@ Look at the file ``lib/system/hti.nim`` for more information.
Rebuilding the compiler
========================

After an initial build via `sh build_all.sh` on posix or `build_all.bat` on windows,
After an initial build via ``sh build_all.sh`` on posix or ``build_all.bat`` on windows,
you can rebuild the compiler as follows:
* `nim c koch` if you need to rebuild koch
* `./koch boot -d:release` this ensures the compiler can rebuild itself
(use `koch` instead of `./koch` on windows), which builds the compiler 3 times.

A faster approach if you don't need to run the full bootstrapping implied by `koch boot`,
* ``nim c koch`` if you need to rebuild koch
* ``./koch boot -d:release`` this ensures the compiler can rebuild itself
(use ``koch`` instead of ``./koch`` on windows), which builds the compiler 3 times.

A faster approach if you don't need to run the full bootstrapping implied by ``koch boot``,
is the following:
* `pathto/nim c --lib:lib -d:release -o:bin/nim_temp compiler/nim.nim`
Where `pathto/nim` is any nim binary sufficiently recent (e.g. `bin/nim_cources`
built during bootstrap or `$HOME/.nimble/bin/nim` installed by `choosenim 1.2.0`)

You can pass any additional options such as `-d:leanCompiler` if you don't need
certain features or `-d:debug --stacktrace:on --excessiveStackTrace --stackTraceMsgs`
for debugging the compiler. See also
[Debugging the compiler](intern.html#debugging-the-compiler).
* ``pathto/nim c --lib:lib -d:release -o:bin/nim_temp compiler/nim.nim``

Where ``pathto/nim`` is any nim binary sufficiently recent (e.g. ``bin/nim_cources``
built during bootstrap or ``$HOME/.nimble/bin/nim`` installed by ``choosenim 1.2.0``)

You can pass any additional options such as ``-d:leanCompiler`` if you don't need
certain features or ``-d:debug --stacktrace:on --excessiveStackTrace --stackTraceMsgs``
for debugging the compiler. See also `Debugging the compiler`_.

Debugging the compiler
======================
Expand Down Expand Up @@ -174,8 +176,7 @@ To create a new compiler for each run, use ``koch temp``::

``koch temp`` creates a debug build of the compiler, which is useful
to create stacktraces for compiler debugging. See also
[Rebuilding the compiler](intern.html#rebuilding-the-compiler) if you need
more control.
`Rebuilding the compiler`_ if you need more control.

Bisecting for regressions
=========================
Expand All @@ -189,8 +190,7 @@ current commit.::

You can also bisect using custom options to build the compiler, for example if
you don't need a debug version of the compiler (which runs slower), you can replace
`./koch temp` by explicit compilation command, see
[Rebuilding the compiler](intern.html#rebuilding-the-compiler).
``./koch temp`` by explicit compilation command, see `Rebuilding the compiler`_.

The compiler's architecture
===========================
Expand Down

0 comments on commit 28d101e

Please sign in to comment.