@@ -151,21 +151,11 @@ RUST_LIB_SRC ?= $(rustc_sysroot)/lib/rustlib/src/rust/library
151
151
rust-analyzer :
152
152
$(Q )$(srctree ) /scripts/generate_rust_analyzer.py $(srctree ) $(objtree ) $(RUST_LIB_SRC ) $(objtree ) /rust/bindings_generated.rs > $(objtree ) /rust-project.json
153
153
154
- .SECONDEXPANSION :
155
- $(objtree ) /rust/core.o : private skip_clippy = 1
156
- $(objtree ) /rust/core.o : $$(RUST_LIB_SRC ) /core/src/lib.rs FORCE
157
- $(call if_changed_dep,rustc_library)
158
-
159
154
$(objtree ) /rust/compiler_builtins.o : private rustc_objcopy = -w -W '__* '
160
155
$(objtree ) /rust/compiler_builtins.o : $(srctree ) /rust/compiler_builtins.rs \
161
156
$(objtree)/rust/core.o FORCE
162
157
$(call if_changed_dep,rustc_library)
163
158
164
- $(objtree ) /rust/alloc.o : private skip_clippy = 1
165
- $(objtree ) /rust/alloc.o : $$(RUST_LIB_SRC ) /alloc/src/lib.rs \
166
- $(objtree)/rust/compiler_builtins.o FORCE
167
- $(call if_changed_dep,rustc_library)
168
-
169
159
$(objtree ) /rust/build_error.o : $(srctree ) /rust/build_error.rs \
170
160
$(objtree)/rust/compiler_builtins.o FORCE
171
161
$(call if_changed_dep,rustc_library)
@@ -178,3 +168,14 @@ $(objtree)/rust/kernel.o: $(srctree)/rust/kernel/lib.rs $(objtree)/rust/alloc.o
178
168
$(objtree)/rust/build_error.o \
179
169
$(objtree)/rust/libmacros.so $(objtree)/rust/bindings_generated.rs FORCE
180
170
$(call if_changed_dep,rustc_library)
171
+
172
+ # Targets that need to expand twice
173
+ .SECONDEXPANSION :
174
+ $(objtree ) /rust/core.o : private skip_clippy = 1
175
+ $(objtree ) /rust/core.o : $$(RUST_LIB_SRC ) /core/src/lib.rs FORCE
176
+ $(call if_changed_dep,rustc_library)
177
+
178
+ $(objtree ) /rust/alloc.o : private skip_clippy = 1
179
+ $(objtree ) /rust/alloc.o : $$(RUST_LIB_SRC ) /alloc/src/lib.rs \
180
+ $(objtree)/rust/compiler_builtins.o FORCE
181
+ $(call if_changed_dep,rustc_library)
0 commit comments