mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-28 22:22:10 +03:00
Add bootstrapping instructions
Added a known good scheme output which can be used to start the bootstrapping process.
This commit is contained in:
parent
2968681063
commit
555f522ad0
47
INSTALL.md
Normal file
47
INSTALL.md
Normal file
@ -0,0 +1,47 @@
|
||||
0. Fix hard coded prefix (sorry)
|
||||
--------------------------------
|
||||
|
||||
This isn't easily configurable yet - I will deal with it soon. So, before
|
||||
you start:
|
||||
|
||||
* Change the `prefix` which is currently hard coded in `Idris.Main`.
|
||||
|
||||
1a. Installing without an existing Idris 2
|
||||
------------------------------------------
|
||||
|
||||
If you *don't* have Idris-2-in-Idris-1 installed, you can build a bootstrapping
|
||||
compiler from the files in `bootstrap/` as follows:
|
||||
|
||||
* `sh ./init-bootstrap scheme`
|
||||
|
||||
(`scheme` is the executable name of the Chez Scheme compiler. You may need to
|
||||
replace this with the executable for Chez Scheme on your system. This could be
|
||||
`chezscheme` or `chezscheme9.5` or something else, depending on your system and
|
||||
the Chez Scheme version).
|
||||
|
||||
This builds an Idris 2 compiler from scheme code output from a working Idris 2
|
||||
compiler (which isn't necessarily up to date, but is up to date enough to
|
||||
build the current repository).
|
||||
|
||||
Then, to build Idris 2
|
||||
|
||||
* `make all IDRIS2_BOOT=bootstrap/idris2-boot`
|
||||
* `make install`
|
||||
|
||||
1b. Installing with an existing Idris 2
|
||||
---------------------------------------
|
||||
|
||||
If you have Idris-2-in-Idris-1 installed:
|
||||
|
||||
* `make all && make install`
|
||||
|
||||
2. Self-hosting step
|
||||
--------------------
|
||||
|
||||
Then, to build from the newly installed `idris2sh`
|
||||
|
||||
* `make clean` -- to make sure you're building everything with the new version
|
||||
* `make all IDRIS_BOOT=idris2sh && make install`
|
||||
|
||||
For amusement, try using `time` on the above. I get about 3m for installing
|
||||
from `idris2`, and about 1m45 for installing from `idris2sh`.
|
15
README.md
15
README.md
@ -1,12 +1,7 @@
|
||||
To build and install from Idris 2 in Idris 1:
|
||||
Self-hosted Idris 2
|
||||
-------------------
|
||||
|
||||
* Change the `prefix` which is currently hard coded in `Idris.Main`
|
||||
* `make all && make install`
|
||||
See `INSTALL.md` for installation instructions.
|
||||
|
||||
Then, to build from the newly installed `idris2sh`
|
||||
|
||||
* make clean
|
||||
* `make all IDRIS_BOOT=idris2sh && make install`
|
||||
|
||||
For amusement, try using `time` on the above. I get about 3m for installing
|
||||
from `idris2`, and about 1m45 for installing from `idris2sh`.
|
||||
This repository might move or be renamed or anything at no notice. It will
|
||||
eventually turn into the real Idris 2 repository, one way or another.
|
||||
|
1
bootstrap/compile.ss
Normal file
1
bootstrap/compile.ss
Normal file
@ -0,0 +1 @@
|
||||
(parameterize ([optimize-level 3]) (compile-program "idris2-boot_app/idris2sh.ss"))
|
4
bootstrap/idris2-boot
Executable file
4
bootstrap/idris2-boot
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`dirname $0`/"idris2-boot_app""
|
||||
`dirname $0`/"idris2-boot_app/idris2sh.so" "$@"
|
6862
bootstrap/idris2-boot_app/idris2sh.ss
Executable file
6862
bootstrap/idris2-boot_app/idris2sh.ss
Executable file
File diff suppressed because one or more lines are too long
6
init-bootstrap
Executable file
6
init-bootstrap
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
make support
|
||||
cp support/c/libidris2_support.so bootstrap/idris2-boot_app
|
||||
cd bootstrap
|
||||
$1 --script compile.ss
|
Loading…
Reference in New Issue
Block a user