On Tue, Oct 15, 2024 at 1:06 PM kernel test robot <lkp@xxxxxxxxx> wrote: > > >> /bin/sh: 1: cannot create rust/kernel/arch_static_branch_asm.rs: Directory nonexistent This happens because we run `RSCPP` even when it is not a target. We can add the dependency conditionally: @@ -423,8 +425,10 @@ $(obj)/uapi.o: $(src)/uapi/lib.rs \ $(obj)/kernel.o: private rustc_target_flags = --extern alloc \ --extern build_error --extern macros --extern bindings --extern uapi $(obj)/kernel.o: $(src)/kernel/lib.rs $(obj)/alloc.o $(obj)/build_error.o \ - $(obj)/libmacros.so $(obj)/bindings.o $(obj)/uapi.o \ - $(obj)/kernel/arch_static_branch_asm.rs FORCE + $(obj)/libmacros.so $(obj)/bindings.o $(obj)/uapi.o FORCE +$(call if_changed_rule,rustc_library) +ifneq ($(CONFIG_JUMP_LABEL),) +$(obj)/kernel.o: $(obj)/kernel/arch_static_branch_asm.rs +endif Cheers, Miguel