File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1208,7 +1208,11 @@ export MODORDER := $(extmod-prefix)modules.order
12081208export MODULES_NSDEPS := $(extmod-prefix ) modules.nsdeps
12091209
12101210ifeq ($(KBUILD_EXTMOD ) ,)
1211- core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ rust/
1211+ core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
1212+
1213+ ifdef CONFIG_RUST
1214+ core-y += rust/
1215+ endif
12121216
12131217vmlinux-dirs := $(patsubst % /,% ,$(filter % /, \
12141218 $(core-y ) $(core-m ) $(drivers-y ) $(drivers-m ) \
@@ -1310,7 +1314,9 @@ archprepare: outputmakefile archheaders archscripts scripts include/config/kerne
13101314prepare0 : archprepare
13111315 $(Q )$(MAKE ) $(build ) =scripts/mod
13121316 $(Q )$(MAKE ) $(build ) =.
1317+ ifdef CONFIG_RUST
13131318 $(Q)$(MAKE) $(build)=rust
1319+ endif
13141320
13151321# All the preparing..
13161322prepare : prepare0 prepare-objtool prepare-resolve_btfids
Original file line number Diff line number Diff line change @@ -2039,6 +2039,7 @@ config PROFILING
20392039config RUST
20402040 bool "Rust support"
20412041 depends on HAS_RUST
2042+ depends on !COMPILE_TEST
20422043 default n
20432044 help
20442045 Enables Rust support in the kernel.
You can’t perform that action at this time.
0 commit comments