Skip to content

Commit f7b3740

Browse files
committed
Only throw error when installing sanitizers
1 parent 1bf6d82 commit f7b3740

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

deps/sanitizers.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ endif
77

88
# Given a colon-separated list of paths in $(2), find the location of the library given in $(1)
99
define pathsearch_all
10-
$(eval _result := $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2))))))
11-
$(if $(_result),$(_result),$(error No matches found for '$(1)' in $(2)))
10+
$(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2)))))
1211
endef
1312

1413
define copy_sanitizer_lib
1514
install-sanitizers: $$(addprefix $$(build_libdir)/, $$(notdir $$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH)))) | $$(build_shlibdir)
15+
@result=$$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH)); \
16+
if [ -z "$$$$result" ]; then \
17+
echo "Sanitizer library $(1) not found in $$(SANITIZER_LIB_PATH)"; \
18+
exit 1; \
19+
fi
1620
$$(addprefix $$(build_shlibdir)/,$(2)): $$(addprefix $$(dir $$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH))),$(2)) | $$(build_shlibdir)
1721
-cp $$< $$@
1822
$(if $(filter $(OS), Linux), \

0 commit comments

Comments
 (0)