@@ -64,7 +64,7 @@ $(objtree)/rust/exports_kernel_generated.h: $(objtree)/rust/kernel.o FORCE
6464
6565quiet_cmd_rustc_procmacro = RUSTC P $@
6666 cmd_rustc_procmacro = \
67- $(RUSTC ) $(rustc_flags ) --emit=dep-info,link --edition 2018 -- extern proc_macro \
67+ $(RUSTC ) $(rustc_flags ) --emit=dep-info,link --extern proc_macro \
6868 --crate-type proc-macro --out-dir $(objtree ) /rust/ \
6969 --crate-name $(patsubst lib% .so,% ,$(notdir $@ ) ) $< ; \
7070 mv $(objtree ) /rust/$(patsubst lib% .so,% ,$(notdir $@ ) ) .d $(depfile ) ; \
@@ -86,27 +86,22 @@ quiet_cmd_rustc_library = RUSTC L $@
8686# `$(rustc_flags)` is passed in case the user added `--sysroot`.
8787rustc_sysroot = $(shell $(RUSTC ) $(rustc_flags ) --print sysroot)
8888rustc_src = $(rustc_sysroot ) /lib/rustlib/src/rust
89- compiler_builtins_src = $(rustc_sysroot ) /lib/rustlib/src/compiler-builtins
9089
9190.SECONDEXPANSION :
92- $(objtree ) /rust/core.o : rustc_target_flags = --edition 2018
9391$(objtree ) /rust/core.o : $$(rustc_src ) /library/core/src/lib.rs FORCE
9492 $(call if_changed_dep,rustc_library)
9593
96- $(objtree ) /rust/compiler_builtins.o : rustc_objcopy = -w -W '__* ' -W '!__rust* '
97- $(objtree ) /rust/compiler_builtins.o : rustc_target_flags = --edition 2015 \
98- --cfg ' feature="compiler-builtins"' --cfg ' feature="default"'
99- $(objtree ) /rust/compiler_builtins.o : $$(compiler_builtins_src ) /src/lib.rs \
94+ $(objtree ) /rust/compiler_builtins.o : rustc_objcopy = -w -W '__* '
95+ $(objtree ) /rust/compiler_builtins.o : $(srctree ) /rust/compiler_builtins.rs \
10096 $(objtree)/rust/core.o FORCE
10197 $(call if_changed_dep,rustc_library)
10298
103- $(objtree ) /rust/alloc.o : rustc_target_flags = --edition 2018
10499$(objtree ) /rust/alloc.o : $$(rustc_src ) /library/alloc/src/lib.rs \
105100 $(objtree)/rust/compiler_builtins.o FORCE
106101 $(call if_changed_dep,rustc_library)
107102
108103# ICE on `--extern module`: https://github.com/rust-lang/rust/issues/56935
109- $(objtree ) /rust/kernel.o : rustc_target_flags = --edition 2018 -- extern alloc \
104+ $(objtree ) /rust/kernel.o : rustc_target_flags = --extern alloc \
110105 --extern module=$(objtree)/rust/libmodule.so
111106$(objtree ) /rust/kernel.o : $(srctree ) /rust/kernel/lib.rs $(objtree ) /rust/alloc.o \
112107 $(objtree)/rust/libmodule.so $(objtree)/rust/bindings_generated.rs FORCE
0 commit comments