Skip to content

Commit

Permalink
Only throw error when installing sanitizers
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Oct 13, 2024
1 parent e28df32 commit c7eac60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions deps/sanitizers.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ endif

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

define copy_sanitizer_lib
install-sanitizers: $$(addprefix $$(build_libdir)/, $$(notdir $$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH)))) | $$(build_shlibdir)
@result=$$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH)); \
if [ -z "$$$$result" ]; then \
echo "Sanitizer library $(1) not found in $$(SANITIZER_LIB_PATH)"; \
exit 1; \
fi
$$(addprefix $$(build_shlibdir)/,$(2)): $$(addprefix $$(dir $$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH))),$(2)) | $$(build_shlibdir)
-cp $$< $$@
$(if $(filter $(OS), Linux), \
Expand Down

0 comments on commit c7eac60

Please sign in to comment.