Skip to content

Commit c89e3e9

Browse files
Update Readme.md
1 parent 25d4828 commit c89e3e9

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

Readme.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ You can also use my [fork of gcc](https://github.com/antoyo/gcc) which already i
2121
To build it (most of these instructions come from [here](https://gcc.gnu.org/onlinedocs/jit/internals/index.html), so don't hesitate to take a look there if you encounter an issue):
2222

2323
```bash
24+
$ git clone https://github.com/antoyo/gcc
2425
$ cd gcc
25-
$ ./contrib/download_prerequisites
2626
$ sudo apt install flex libmpfr-dev libgmp-dev libmpc3 libmpc-dev
2727
$ ./configure \
2828
--enable-host-shared \
@@ -31,23 +31,33 @@ $ ./configure \
3131
--enable-checking=release \
3232
--prefix=$(pwd)/install \
3333
--disable-multilib
34+
$ make -j4 # You can replace `4` with another number depending on how many cores you have.
35+
$ cd ..
3436
```
3537

3638
**Put the path to your custom build of libgccjit in the file `gcc_path`.**
3739

3840
```bash
39-
$ git clone https://github.com/rust-lang/rustc_codegen_gcc.git
40-
$ cd rustc_codegen_gcc
41+
$ dirname $(readlink -f `find . -name libgccjit.so`) > gcc_path
42+
```
43+
44+
You can set also set RUST_COMPILER_RT_ROOT:
45+
46+
```bash
4147
$ git clone https://github.com/llvm/llvm-project llvm --depth 1 --single-branch
4248
$ export RUST_COMPILER_RT_ROOT="$PWD/llvm/compiler-rt"
43-
$ ./prepare_build.sh # download and patch sysroot src
44-
$ ./build.sh --release
4549
```
4650

47-
To run the tests:
51+
Then you can run commands like this:
4852

4953
```bash
5054
$ ./prepare.sh # download and patch sysroot src and install hyperfine for benchmarking
55+
$ LIBRARY_PATH=$(cat gcc_path) LD_LIBRARY_PATH=$(cat gcc_path) ./build.sh --release
56+
```
57+
58+
To run the tests:
59+
60+
```bash
5161
$ ./test.sh --release
5262
```
5363

0 commit comments

Comments
 (0)