@@ -32,7 +32,7 @@ quiet_cmd_rustdoc = RUSTDOC $(if $(rustdoc_host),H, ) $<
32
32
cmd_rustdoc = \
33
33
RUST_BINDINGS_FILE=$(abspath $(objtree ) /rust/bindings_generated.rs) \
34
34
$(RUSTDOC ) $(if $(rustdoc_host ) ,,$(rust_cross_flags ) ) \
35
- $(filter-out -Cpanic=abort, $(filter-out --emit=% , $(rustc_flags ) ) ) \
35
+ $(filter-out -Cpanic=abort, $(filter-out --emit=% , $(rust_flags ) ) ) \
36
36
$(rustc_target_flags ) -L $(objtree ) /rust \
37
37
--output $(objtree ) /rust/doc --crate-name $(subst rustdoc-,,$@ ) \
38
38
@$(objtree ) /include/generated/rustc_cfg $<
@@ -79,7 +79,7 @@ rustdoc-kernel: $(srctree)/rust/kernel/lib.rs rustdoc-core \
79
79
quiet_cmd_rustc_test_library = RUSTC TL $<
80
80
cmd_rustc_test_library = \
81
81
RUST_BINDINGS_FILE=$(abspath $(objtree ) /rust/bindings_generated.rs) \
82
- $(RUSTC ) $(filter-out --sysroot=% , $(filter-out -Cpanic=abort, $(filter-out --emit=% , $(rustc_flags ) ) ) ) \
82
+ $(RUSTC ) $(filter-out --sysroot=% , $(filter-out -Cpanic=abort, $(filter-out --emit=% , $(rust_flags ) ) ) ) \
83
83
$(rustc_target_flags ) --crate-type $(if $(rustc_test_library_proc ) ,proc-macro,rlib) \
84
84
--out-dir $(objtree ) /rust/test/ --cfg testlib \
85
85
--sysroot $(objtree ) /rust/test/sysroot \
@@ -96,7 +96,7 @@ rusttestlib-macros: $(srctree)/rust/macros/lib.rs rusttest-prepare FORCE
96
96
quiet_cmd_rustdoc_test = RUSTDOC T $<
97
97
cmd_rustdoc_test = \
98
98
RUST_BINDINGS_FILE=$(abspath $(objtree ) /rust/bindings_generated.rs) \
99
- $(RUSTDOC ) --test $(filter-out --sysroot=% , $(filter-out -Cpanic=abort, $(filter-out --emit=% , $(rustc_flags ) ) ) ) \
99
+ $(RUSTDOC ) --test $(filter-out --sysroot=% , $(filter-out -Cpanic=abort, $(filter-out --emit=% , $(rust_flags ) ) ) ) \
100
100
$(rustc_target_flags ) $(rustdoc_test_target_flags ) \
101
101
--sysroot $(objtree ) /rust/test/sysroot $(rustdoc_test_quiet ) \
102
102
-L $(objtree ) /rust/test \
@@ -108,7 +108,7 @@ quiet_cmd_rustdoc_test = RUSTDOC T $<
108
108
quiet_cmd_rustc_test = RUSTC T $<
109
109
cmd_rustc_test = \
110
110
RUST_BINDINGS_FILE=$(abspath $(objtree ) /rust/bindings_generated.rs) \
111
- $(RUSTC ) --test $(filter-out --sysroot=% , $(filter-out -Cpanic=abort, $(filter-out --emit=% , $(rustc_flags ) ) ) ) \
111
+ $(RUSTC ) --test $(filter-out --sysroot=% , $(filter-out -Cpanic=abort, $(filter-out --emit=% , $(rust_flags ) ) ) ) \
112
112
$(rustc_target_flags ) --out-dir $(objtree ) /rust/test \
113
113
--sysroot $(objtree ) /rust/test/sysroot \
114
114
-L $(objtree ) /rust/test/ --crate-name $(subst rusttest-,,$@ ) $< ; \
@@ -244,11 +244,11 @@ $(objtree)/rust/exports_alloc_generated.h: $(objtree)/rust/alloc.o FORCE
244
244
$(objtree ) /rust/exports_kernel_generated.h : $(objtree ) /rust/kernel.o FORCE
245
245
$(call if_changed,exports)
246
246
247
- # `-Cpanic=unwind -Cforce-unwind-tables=y` overrides `rustc_flags ` in order to
247
+ # `-Cpanic=unwind -Cforce-unwind-tables=y` overrides `rust_flags ` in order to
248
248
# avoid the https://github.com/rust-lang/rust/issues/82320 rustc crash.
249
249
quiet_cmd_rustc_procmacro = $(RUSTC_OR_CLIPPY_QUIET ) P $@
250
250
cmd_rustc_procmacro = \
251
- $(RUSTC_OR_CLIPPY ) $(rustc_flags ) \
251
+ $(RUSTC_OR_CLIPPY ) $(rust_flags ) \
252
252
--emit=dep-info,link --extern proc_macro \
253
253
-Cpanic=unwind -Cforce-unwind-tables=y \
254
254
--crate-type proc-macro --out-dir $(objtree ) /rust/ \
@@ -267,15 +267,15 @@ quiet_cmd_rustc_library = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) L
267
267
cmd_rustc_library = \
268
268
RUST_BINDINGS_FILE=$(abspath $(objtree ) /rust/bindings_generated.rs) \
269
269
$(if $(skip_clippy ) ,$(RUSTC ) ,$(RUSTC_OR_CLIPPY ) ) \
270
- $(rustc_flags ) $(rust_cross_flags ) $(rustc_target_flags ) \
270
+ $(rust_flags ) $(rust_cross_flags ) $(rustc_target_flags ) \
271
271
--crate-type rlib --out-dir $(objtree ) /rust/ -L $(objtree ) /rust/ \
272
272
--crate-name $(patsubst % .o,% ,$(notdir $@ ) ) $< ; \
273
273
mv $(objtree ) /rust/$(patsubst % .o,% ,$(notdir $@ ) ) .d $(depfile ) ; \
274
274
sed -i '/^\# /d' $(depfile) \
275
275
$(if $(rustc_objcopy),;$(OBJCOPY) $(rustc_objcopy) $@)
276
276
277
- # `$(rustc_flags )` is passed in case the user added `--sysroot`.
278
- rustc_sysroot = $(shell $(RUSTC ) $(rustc_flags ) --print sysroot)
277
+ # `$(rust_flags )` is passed in case the user added `--sysroot`.
278
+ rustc_sysroot = $(shell $(RUSTC ) $(rust_flags ) --print sysroot)
279
279
rustc_host_target = $(shell $(RUSTC ) --version --verbose | grep -F 'host: ' | cut -d' ' -f2)
280
280
RUST_LIB_SRC ?= $(rustc_sysroot ) /lib/rustlib/src/rust/library
281
281
0 commit comments