Skip to content

Commit cb14f43

Browse files
Improve instructions to start working on the project
1 parent 6bdcc3c commit cb14f43

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

Readme.md

+18-7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ A secondary goal is to check if using the gcc backend will provide any run-time
1717
**This requires a patched libgccjit in order to work.
1818
You need to use my [fork of gcc](https://github.com/antoyo/gcc) which already includes these patches.**
1919

20+
```bash
21+
$ cp config.example.toml config.toml
22+
```
23+
24+
If don't need to test GCC patches you wrote in our GCC fork, then the default configuration should
25+
be all you need. You can update the `rustc_codegen_gcc` without worrying about GCC.
26+
27+
### Building with your own GCC version
28+
29+
If you wrote a patch for GCC and want to test it without this backend, you will need
30+
to do a few more things.
31+
2032
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):
2133

2234
```bash
@@ -51,18 +63,17 @@ $ make check-jit RUNTESTFLAGS="-v -v -v jit.exp=jit.dg/test-asm.cc"
5163

5264
**Put the path to your custom build of libgccjit in the file `config.toml`.**
5365

54-
If you followed the instructions exactly as written (ie, you have created a `gcc-build` folder
55-
where gcc is built), the only thing you need to do is:
66+
You now need to set the `gcc-path` value in `config.toml` with the result of this command:
5667

5768
```bash
58-
$ cp config.example.toml config.toml
69+
$ dirname $(readlink -f `find . -name libgccjit.so`)
5970
```
6071

61-
But if you did something different, you also need to set the `gcc-path` value in `config.toml` with
62-
the result of this command:
72+
and to comment the `download-gccjit` setting:
6373

64-
```bash
65-
$ dirname $(readlink -f `find . -name libgccjit.so`)
74+
```toml
75+
gcc-path = "[MY PATH]"
76+
# download-gccjit = true
6677
```
6778

6879
Then you can run commands like this:

0 commit comments

Comments
 (0)