Skip to content

Commit bc5fc67

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

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

Readme.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ 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
2526
$ ./contrib/download_prerequisites
2627
$ sudo apt install flex libmpfr-dev libgmp-dev libmpc3 libmpc-dev
@@ -31,23 +32,33 @@ $ ./configure \
3132
--enable-checking=release \
3233
--prefix=$(pwd)/install \
3334
--disable-multilib
35+
$ make -j4 # You can replace `4` with another number depending on how many cores you have.
36+
$ cd ..
3437
```
3538

3639
**Put the path to your custom build of libgccjit in the file `gcc_path`.**
3740

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

47-
To run the tests:
52+
Then you can run commands like this:
4853

4954
```bash
5055
$ ./prepare.sh # download and patch sysroot src and install hyperfine for benchmarking
56+
$ LIBRARY_PATH=$(cat gcc_path) LD_LIBRARY_PATH=$(cat gcc_path) ./build.sh --release
57+
```
58+
59+
To run the tests:
60+
61+
```bash
5162
$ ./test.sh --release
5263
```
5364

0 commit comments

Comments
 (0)