From 74cb1b4e758fa6af67b8e0682572e99fda7cc6aa Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Tue, 18 Aug 2020 17:35:38 +0200 Subject: [PATCH] 8251541: "no symbols" printed when building hotspot Reviewed-by: erikj --- make/hotspot/lib/CompileJvm.gmk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk index fbcd7c21b96..441c09a3853 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -250,14 +250,14 @@ ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) define SetupOperatorNewDeleteCheck $1.op_check: $1 - if [ -n "`$(NM) $$< | $(GREP) $(addprefix -e , $(MANGLED_SYMS)) \ - | $(GREP) $(UNDEF_PATTERN)`" ]; then \ - $(ECHO) "$$<: Error: Use of global operators new and delete is not allowed in Hotspot:"; \ - $(NM) $$< | $(CXXFILT) | $(EGREP) '$(DEMANGLED_REGEXP)' | $(GREP) $(UNDEF_PATTERN); \ - $(ECHO) "See: $(TOPDIR)/make/hotspot/lib/CompileJvm.gmk"; \ + $$(call ExecuteWithLog, $1.op_check, \ + $$(NM) $$< 2>&1 | $$(GREP) $$(addprefix -e , $$(MANGLED_SYMS)) | $$(GREP) $$(UNDEF_PATTERN) > $1.op_check || true) + if [ -s $1.op_check ]; then \ + $$(ECHO) "$$(notdir $$<): Error: Use of global operators new and delete is not allowed in Hotspot:"; \ + $$(NM) $$< | $$(CXXFILT) | $$(EGREP) '$$(DEMANGLED_REGEXP)' | $$(GREP) $$(UNDEF_PATTERN); \ + $$(ECHO) "See: $$(TOPDIR)/make/hotspot/lib/CompileJvm.gmk"; \ exit 1; \ fi - $(TOUCH) $$@ TARGETS += $1.op_check endef