Skip to content

Commit a595dcd

Browse files
rnavmpe
authored andcommitted
Allow limiting sparse run
Today, we always pass C=2 to enable sparse run on all the files. Instead, allow C=1 to also be used to obtain sparse report on only the files being recompiled.
1 parent 6391c9c commit a595dcd

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,16 @@ Other options
9595

9696
As mentioned above you pass the make -j factor with `JFACTOR=n`.
9797

98-
To run sparse use the `ubuntu@21.10` image and pass `SPARSE=1`.
98+
To run sparse use the `ubuntu@21.10` image and pass `SPARSE=2`.
9999

100100
```
101-
$ make SRC=~/src/linux kernel@ppc64le@ubuntu@21.10 SPARSE=1 JFACTOR=$(nproc)
101+
$ make SRC=~/src/linux kernel@ppc64le@ubuntu@21.10 SPARSE=2 JFACTOR=$(nproc)
102102
```
103103

104104
The log will be in eg. `output/ppc64le@ubuntu@21.10/ppc64le_defconfig/sparse.log`.
105105

106+
To only run sparse on files being recompiled, pass `SPARSE=1`.
107+
106108
To build modules pass `MODULES=1`
107109

108110
To convert all modules to builtin, pass `MOD2YES=1`.

build/scripts/container-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if [[ "$1" == "kernel" ]]; then
8686
if [[ -n "$SPARSE" ]]; then
8787
rm -f /output/sparse.log
8888
touch /output/sparse.log
89-
(set -x; make C=2 CF=">> /output/sparse.log 2>&1" $verbose $quiet "$cc" -j $JFACTOR)
89+
(set -x; make C=$SPARSE CF=">> /output/sparse.log 2>&1" $verbose $quiet "$cc" -j $JFACTOR)
9090

9191
rc=$?
9292

0 commit comments

Comments
 (0)