|
1 | 1 | # GCC codegen backend tests
|
2 | 2 |
|
3 | | -TODO: please add some more information to this page. |
| 3 | +To test the GCC codegen backend, you need to add `"gcc"` into the `rust.codegen-backends` |
| 4 | +setting in `bootstrap.toml`: |
| 5 | + |
| 6 | +```toml |
| 7 | +rust.codegen-backends = ["llvm", "gcc"] |
| 8 | +``` |
| 9 | + |
| 10 | +If you don't want to change your `bootstrap.toml` file, you can alternatively run your `x.py` |
| 11 | +commands with `--set rust.codegen-backends=["llvm", "gcc"]'`. For example: |
| 12 | + |
| 13 | +```bash |
| 14 | +x.py test --set 'rust.codegen-backends=["llvm", "gcc"]' |
| 15 | +``` |
| 16 | + |
| 17 | +If you don't want to build `gcc` yourself, you also need to set: |
| 18 | + |
| 19 | +```toml |
| 20 | +gcc.download-ci-gcc = true |
| 21 | +``` |
| 22 | + |
| 23 | +Then when running tests, add the `--test-codegen-backend gcc` option. For example: |
| 24 | + |
| 25 | +```bash |
| 26 | +./x.py test tests/ui --test-codegen-backend gcc |
| 27 | +``` |
| 28 | + |
| 29 | +If you want to build the sysroot using the GCC backend, you need to set it first |
| 30 | +in `rust.codegen-backends`: |
| 31 | + |
| 32 | +```toml |
| 33 | +rust.codegen-backends = ["llvm", "gcc"] |
| 34 | +``` |
0 commit comments