Skip to content

Commit

Permalink
more on static vs dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
awson committed Apr 29, 2021
1 parent 2dac6c6 commit e91b760
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@ The stock distro doesn't support this because of:

For convenience, we also ship statically linked GHC (`ghc-static.exe`,
to use it tell cabal `--with-ghc=ghc-static.exe`), which is analogous
to the stock GHC and has exactly the same workflow. And this workflow is
much faster than the full one because it doesn't create dynamic
to the stock GHC and has exactly the same default workflow.

This default workflow (build static libs and prelinked object files only)
is much faster than full because it doesn't create dynamic
versions of packages.

The key difference between static and dynamic compilers is in that
they have completely different interactive/TH modes: static compiler
loads and parses object files directly, dynamic compiler links
everything into DLLs and loads them using system facilities.

All stock GHC tools are *position dependent* executables and produce
*position dependent* code that must be loaded into lower 2GB address
space. Modern security standards consider this a disadvantage.
Expand Down

0 comments on commit e91b760

Please sign in to comment.