Skip to content

Commit b056d3e

Browse files
committed
Document new gcc.download-ci-gcc option
1 parent 599127c commit b056d3e

File tree

1 file changed

+20
-0
lines changed
  • src/doc/rustc-dev-guide/src/tests/codegen-backend-tests

1 file changed

+20
-0
lines changed

src/doc/rustc-dev-guide/src/tests/codegen-backend-tests/cg_gcc.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,26 @@ will be downloaded from CI or built locally.
7777
The default value is `true`, which will download GCC from CI
7878
if there are no local changes to the GCC sources and the given host target is available on CI.
7979

80+
## Providing your own GCC
81+
82+
There are cases where you will want to provide yourself the `libgccjit.so` file.
83+
One such case is when you want to cross-compile `rustc` to another target since GCC is not a multi-target compiler.
84+
To support this use case, there is the bootstrap option `gcc.libgccjit-libs-dir`.
85+
This option override `gcc.download-ci-gcc`, meaning `libgccjit.so` won't be downloaded or built locally by bootstrap.
86+
The directory structure of this directory is `<host>/<target>/libgccjit.so`, for instance:
87+
88+
```
89+
.
90+
├── m68k-unknown-linux-gnu
91+
│ └── m68k-unknown-linux-gnu
92+
│ └── libgccjit.so
93+
└── x86_64-unknown-linux-gnu
94+
├── m68k-unknown-linux-gnu
95+
│ └── libgccjit.so
96+
└── x86_64-unknown-linux-gnu
97+
└── libgccjit.so
98+
```
99+
80100
## Running tests of the backend itself
81101

82102
In addition to running the compiler's test suites using the GCC codegen backend, you can also run the test suite of the backend itself.

0 commit comments

Comments
 (0)