Skip to content

Commit 166d098

Browse files
committed
Makefile: avoid running rustc for targets like clean
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent ba4eb7a commit 166d098

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,11 @@ export MODULES_NSDEPS := $(extmod_prefix)modules.nsdeps
11621162
ifeq ($(KBUILD_EXTMOD),)
11631163
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/
11641164
core-$(CONFIG_BLOCK) += block/
1165-
core-$(CONFIG_RUST) += rust/
1165+
1166+
# Keep this one as an `ifdef` block since its `Makefile` runs `rustc`.
1167+
ifdef CONFIG_RUST
1168+
core-y += rust/
1169+
endif
11661170

11671171
vmlinux-dirs := $(patsubst %/,%,$(filter %/, \
11681172
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \

0 commit comments

Comments
 (0)