Skip to content

Commit 935e7cb

Browse files
captain5050namhyung
authored andcommitted
tools/build: Don't pass test log files to linker
Separate test log files from object files. Depend on test log output but don't pass to the linker. Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250311213628.569562-2-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent 99476fa commit 935e7cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/build/Makefile.build

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
129129
obj-y := $(addprefix $(objprefix),$(obj-y))
130130
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
131131

132+
# Separate out test log files from real build objects.
133+
test-y := $(filter %_log, $(obj-y))
134+
obj-y := $(filter-out %_log, $(obj-y))
135+
132136
# Final '$(obj)-in.o' object
133137
in-target := $(objprefix)$(obj)-in.o
134138

@@ -139,7 +143,7 @@ $(subdir-y):
139143

140144
$(sort $(subdir-obj-y)): $(subdir-y) ;
141145

142-
$(in-target): $(obj-y) FORCE
146+
$(in-target): $(obj-y) $(test-y) FORCE
143147
$(call rule_mkdir)
144148
$(call if_changed,$(host)ld_multi)
145149

0 commit comments

Comments
 (0)