mirror of
https://github.com/mozilla-actions/sccache-action
synced 2026-09-14 20:13:56 +00:00
Document how to use sccache action for C/C++ (#28)
This commit is contained in:
@@ -49,6 +49,30 @@ For Rust code, the following environment variables should be set:
|
|||||||
RUSTC_WRAPPER: "sccache"
|
RUSTC_WRAPPER: "sccache"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### C/C++ code
|
||||||
|
|
||||||
|
For C/C++ code, the following environment variables should be set:
|
||||||
|
|
||||||
|
```
|
||||||
|
env:
|
||||||
|
SCCACHE_GHA_ENABLED: "true"
|
||||||
|
```
|
||||||
|
|
||||||
|
With cmake, add the following argument:
|
||||||
|
|
||||||
|
```
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
||||||
|
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||||
|
```
|
||||||
|
|
||||||
|
With configure, call it with:
|
||||||
|
```
|
||||||
|
# With gcc
|
||||||
|
./configure CC="sccache gcc" CXX=scache gcc"
|
||||||
|
# With clang
|
||||||
|
./configure CC="sccache clang" CXX=scache clang"
|
||||||
|
```
|
||||||
|
|
||||||
## Prepare a new release
|
## Prepare a new release
|
||||||
|
|
||||||
1. Update the example in README.md
|
1. Update the example in README.md
|
||||||
|
|||||||
Reference in New Issue
Block a user