Skip to content

Commit 2884979

Browse files
authored
Merge pull request #656 from GuillaumeGomez/cleanup
Clean up docs
2 parents 6d8fffe + 8b15bfb commit 2884979

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

CONTRIBUTING.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Once you've completed the setup process outlined in the README, you can proceed
1919

2020
- Matrix: Join our [Matrix channel](https://matrix.to/#/#rustc_codegen_gcc:matrix.org)
2121
- IRC: Join us on [IRC](https://web.libera.chat/#rustc_codegen_gcc)
22-
- GitHub Issues: For bug reports and feature discussions
22+
- [GitHub Issues](https://github.com/rust-lang/rustc_codegen_gcc/issues): For bug reports and feature discussions
2323

2424
We encourage new contributors to join our communication channels and introduce themselves. Feel free to ask questions about where to start or discuss potential contributions.
2525

@@ -28,12 +28,15 @@ We encourage new contributors to join our communication channels and introduce t
2828
### Common Development Tasks
2929

3030
#### Running Specific Tests
31+
3132
To run specific tests, use appropriate flags such as:
33+
3234
- `./y.sh test --test-libcore`
3335
- `./y.sh test --std-tests`
3436
- `cargo test -- <name of test>`
3537

3638
Additionally, you can run the tests of `libgccjit`:
39+
3740
```bash
3841
# libgccjit tests
3942
cd gcc-build/gcc
@@ -43,8 +46,10 @@ make check-jit RUNTESTFLAGS="-v -v -v jit.exp=jit.dg/test-asm.cc"
4346
```
4447

4548
#### Debugging Tools
49+
4650
The project provides several environment variables for debugging:
47-
- `CG_GCCJIT_DUMP_GIMPLE`: Dump the GIMPLE IR
51+
52+
- `CG_GCCJIT_DUMP_GIMPLE`: Dumps the GIMPLE IR
4853
- `CG_RUSTFLAGS`: Additional Rust flags
4954
- `CG_GCCJIT_DUMP_MODULE`: Dumps a specific module
5055
- `CG_GCCJIT_DUMP_TO_FILE`: Creates C-like representation
@@ -54,18 +59,21 @@ Full list of debugging options can be found in the [README](Readme.md#env-vars).
5459
## Making Contributions
5560

5661
### Finding Issues to Work On
62+
5763
1. Look for issues labeled with [`good first issue`](https://github.com/rust-lang/rustc_codegen_gcc/issues?q=is%3Aissue%20state%3Aopen%20label%3A"good%20first%20issue") or [`help wanted`](https://github.com/rust-lang/rustc_codegen_gcc/issues?q=is%3Aissue%20state%3Aopen%20label%3A"help%20wanted")
5864
2. Check the [progress report](https://blog.antoyo.xyz/rustc_codegen_gcc-progress-report-34#state_of_rustc_codegen_gcc) for larger initiatives
5965
3. Consider improving documentation or investigating [failing tests](https://github.com/rust-lang/rustc_codegen_gcc/tree/master/tests) (except `failing-ui-tests12.txt`)
6066

6167
### Pull Request Process
68+
6269
1. Fork the repository and create a new branch
6370
2. Make your changes with clear commit messages
6471
3. Add tests for new functionality
6572
4. Update documentation as needed
6673
5. Submit a PR with a description of your changes
6774

6875
### Code Style Guidelines
76+
6977
- Follow Rust standard coding conventions
7078
- Ensure your code passes `rustfmt` and `clippy`
7179
- Add comments explaining complex logic, especially in GCC interface code

Readme.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ You need to use my [fork of gcc](https://github.com/rust-lang/gcc) which already
1919
The default configuration (see below in the [Quick start](#quick-start) section) will download a `libgccjit` built in the CI that already contains these patches, so you don't need to build this fork yourself if you use the default configuration.
2020

2121
### Dependencies
22-
- rustup: follow instructions on the [official website](https://rustup.rs)
23-
- consider to install DejaGnu which is necessary for running the libgccjit test suite. [website](https://www.gnu.org/software/dejagnu/#downloading)
24-
- additional packages: `flex`, `libmpfr-dev`, `libgmp-dev`, `libmpc3`, `libmpc-dev`
22+
23+
- rustup: follow instructions on the [official website](https://rustup.rs)
24+
- consider to install DejaGnu which is necessary for running the libgccjit test suite. [website](https://www.gnu.org/software/dejagnu/#downloading)
25+
- additional packages: `flex`, `libmpfr-dev`, `libgmp-dev`, `libmpc3`, `libmpc-dev`
2526

2627
### Quick start
28+
2729
1. Clone and configure the repository:
2830
```bash
2931
git clone https://github.com/rust-lang/rustc_codegen_gcc
@@ -157,7 +159,7 @@ You can do the same manually (although we don't recommend it):
157159
$ LIBRARY_PATH="[gcc-path value]" LD_LIBRARY_PATH="[gcc-path value]" rustc +$(cat $CG_GCCJIT_DIR/rust-toolchain | grep 'channel' | cut -d '=' -f 2 | sed 's/"//g' | sed 's/ //g') -Cpanic=abort -Zcodegen-backend=$CG_GCCJIT_DIR/target/release/librustc_codegen_gcc.so --sysroot $CG_GCCJIT_DIR/build_sysroot/sysroot my_crate.rs
158160
```
159161

160-
## Env vars
162+
## Environment variables
161163

162164
* _**CG_GCCJIT_DUMP_ALL_MODULES**_: Enables dumping of all compilation modules. When set to "1", a dump is created for each module during compilation and stored in `/tmp/reproducers/`.
163165
* _**CG_GCCJIT_DUMP_MODULE**_: Enables dumping of a specific module. When set with the module name, e.g., `CG_GCCJIT_DUMP_MODULE=module_name`, a dump of that specific module is created in `/tmp/reproducers/`.

0 commit comments

Comments
 (0)