From 5972f3e86266edda4a81fc74602d473a43926ba5 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Thu, 20 May 2021 20:27:49 +0100 Subject: [PATCH] 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 Signed-off-by: Gary Guo --- rust/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rust/Makefile b/rust/Makefile index cca4755581db13..85c1904b674b78 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -9,7 +9,9 @@ extra-$(CONFIG_RUST) += bindings_generated.rs obj-$(CONFIG_RUST) += alloc.o kernel.o extra-$(CONFIG_RUST) += exports_alloc_generated.h exports_kernel_generated.h -ifndef CONFIG_RUST_BUILD_ASSERT_DENY +ifdef CONFIG_RUST_BUILD_ASSERT_DENY +extra-$(CONFIG_RUST) += build_error.o +else obj-$(CONFIG_RUST) += build_error.o endif