Skip to content

Commit fdf04df

Browse files
authored
Merge pull request #803 from harin-ramesh/doc/issue-603
Clarify -Cllvm-args forwarding to GCC in Readme
2 parents db67f59 + e95bba1 commit fdf04df

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/tips.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ be useful.
99
CG_RUSTFLAGS="-Clink-args=-save-temps -v" ../y.sh cargo build
1010
```
1111

12+
### How to send arguments to GCC
13+
14+
The `-Cllvm-args` `rustc` flag is repurposed by `rustc_codegen_gcc` to pass arguments directly to the GCC backend. You can use it via the `CG_RUSTFLAGS` environment variable. For example, to pass a `-f` flag to GCC:
15+
16+
```
17+
CG_RUSTFLAGS="-Cllvm-args=-fflag-name" ../y.sh cargo build
18+
```
19+
1220
### How to see the personality functions in the asm dump
1321

1422
```

0 commit comments

Comments
 (0)