Skip to content

Commit 5972f3e

Browse files
committed
rust: fix double build of kernel.o
Put build_error.o in `extra-y` if it's not in `obj-y` so it's always in `targets`. Reported-by: Sven Van Asbroeck <[email protected]> Signed-off-by: Gary Guo <[email protected]>
1 parent 776af46 commit 5972f3e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ extra-$(CONFIG_RUST) += bindings_generated.rs
99
obj-$(CONFIG_RUST) += alloc.o kernel.o
1010
extra-$(CONFIG_RUST) += exports_alloc_generated.h exports_kernel_generated.h
1111

12-
ifndef CONFIG_RUST_BUILD_ASSERT_DENY
12+
ifdef CONFIG_RUST_BUILD_ASSERT_DENY
13+
extra-$(CONFIG_RUST) += build_error.o
14+
else
1315
obj-$(CONFIG_RUST) += build_error.o
1416
endif
1517

0 commit comments

Comments
 (0)