Skip to content

Commit

Permalink
Add explanations on how to run rustc_codegen_gcc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 5, 2023
1 parent f42a31f commit 3bbb090
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/tests/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,36 @@ communicate with the server to coordinate running tests (see
[remote-test-server]: https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-server
[src/bootstrap/test.rs]: https://github.com/rust-lang/rust/tree/master/src/bootstrap/test.rs

## Running rustc_codegen_gcc tests

First thing to know is that it only supports linux x86_64 at the moment. We will
extend its support later on.

You need to update `codegen-backends` value in your `config.toml` file in the
`[rust]` section and add "gcc" in the array:

```toml
codegen-backends = ["llvm", "gcc"]
```

Then you need to install libgccjit 12. For example with `apt`:

```bash
$ apt install libgccjit-12-dev
```

Now you can run the following command:

```bash
$ ./x.py test compiler/rustc_codegen_gcc/
```

If it cannot find the `.so` library (if you installed it with `apt` for example), you
need to pass the library file path with `LIBRARY_PATH`:

```bash
$ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/ ./x.py test compiler/rustc_codegen_gcc/
```

If you encounter bugs or problems, don't hesitate to open issues on
[rustc_codegen_gcc repository](github.com/rust-lang/rustc_codegen_gcc/).

0 comments on commit 3bbb090

Please sign in to comment.