Skip to content

Commit

Permalink
Add more documentation on building MoarVM
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiepi committed Feb 2, 2018
1 parent 35df90b commit 66f1690
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Configure.pl
Expand Up @@ -399,6 +399,7 @@ sub print_help {
--make-install Install Rakudo after configuration is done
--moar-option='--option=value'
Options to pass to MoarVM's Configure.pl
For example: --moar-option='--compiler=clang'
--git-protocol={ssh,https,git}
Protocol used for cloning git repos
--git-depth=<number>
Expand All @@ -414,7 +415,9 @@ sub print_help {
Please note that the --gen-moar and --gen-nqp options are there for convenience
only and will actually immediately - at Configure time - compile and install
moar and nqp respectively. They will live under the path given to --prefix,
unless other targeting options are used.
unless other targeting options are used. To configure how MoarVM should be
compiled, use the --moar-option flag and view MoarVM's Configure.pl for more
information on its configuration options.
Configure.pl also reads options from 'config.default' in the current directory.
END
Expand Down
28 changes: 25 additions & 3 deletions README.md
Expand Up @@ -42,20 +42,42 @@ any administrator privileges for carrying out this step.

To automatically download, build, and install a fresh MoarVM and NQP, run:

perl Configure.pl --gen-moar --gen-nqp --backends=moar
$ perl Configure.pl --gen-moar --gen-nqp --backends=moar

Please be aware, that this will install MoarVM and NQP into your given
--prefix before Configure.pl exits.

Alternatively, feel free to git clone https://github.com/perl6/nqp and
https://github.com/MoarVM/MoarVM manually and install them individually.

Configuration flags can be passed to MoarVM's Configure.pl using the
--moar-option flag. For example, if you wish to use Clang when GCC is the
default compiler selected for your OS, use the --compiler flag:

$ perl Configure.pl --gen-moar --moar-option='--compiler=clang' \
--gen-nqp --backends=moar

If the compiler you want to use isn't known by MoarVM or you have multiple
versions of the same compiler installed, the --cc flag can be used to pass its
exact binary:

$ perl Configure.pl --gen-moar --moar-option='--cc=egcc' \
--gen-nqp --backends=moar

Custom optimization and debugging levels may also be passed through:

$ perl Configure.pl --gen-moar --moar-option='--optimize=0 --debug=3' \
--gen-nqp --backends=moar

For more information on how MoarVM can be configured, view MoarVM's
Configure.pl.

### Configuring Rakudo to run on the JVM

Note that to run Rakudo on JVM, JDK 1.8 must be installed. To automatically
download, build, and install a fresh NQP, run:

perl Configure.pl --gen-nqp --backends=jvm
$ perl Configure.pl --gen-nqp --backends=jvm

If you get an out of memory error building rakudo on the JVM, you may
need to modify your NQP runner to limit memory use. e.g. edit the
Expand Down Expand Up @@ -125,7 +147,7 @@ If you would like simple history and tab completion in the perl6 executable,
you need to install the Linenoise module. The recommended way to install
Linenoise is via [zef](https://github.com/ugexe/zef):

zef install Linenoise
$ zef install Linenoise

An alternative is to use a third-party program such as [rlwrap](http://utopia.knoware.nl/~hlub/uck/rlwrap/#rlwrap).

Expand Down

0 comments on commit 66f1690

Please sign in to comment.