mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
kunit: Always descend into kunit directory during build
For kbuild to properly clean up these build artifacts in the subdirectory, even after CONFIG_KUNIT changed do disabled, the directory needs to be processed always. Pushing the special logic for hook.o into the kunit Makefile also makes the logic easier to understand. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: David Gow <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
This commit is contained in:
1 parent
8f5ae30d69
commit
29128da29d
2 files changed
+1
-5
No files matched your search
@@ -109,11 +109,7 @@ test_fpu-y := test_fpu_glue.o test_fpu_impl.o
|
||||
CFLAGS_test_fpu_impl.o += $(CC_FLAGS_FPU)
|
||||
CFLAGS_REMOVE_test_fpu_impl.o += $(CC_FLAGS_NO_FPU)
|
||||
|
||||
# Some KUnit files (hooks.o) need to be built-in even when KUnit is a module,
|
||||
# so we can't just use obj-$(CONFIG_KUNIT).
|
||||
ifdef CONFIG_KUNIT
|
||||
obj-y += kunit/
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
|
||||
CFLAGS_kobject.o += -DDEBUG
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ kunit-objs += debugfs.o
|
||||
endif
|
||||
|
||||
# KUnit 'hooks' are built-in even when KUnit is built as a module.
|
||||
obj-y += hooks.o
|
||||
obj-$(if $(CONFIG_KUNIT),y) += hooks.o
|
||||
|
||||
obj-$(CONFIG_KUNIT_TEST) += kunit-test.o
|
||||
obj-$(CONFIG_KUNIT_TEST) += platform-test.o
|
||||
|
||||
Reference in new issue
Block a user