From cff9a64a48369222d27f615ce0d83c6426137ab8 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 4 Oct 2016 17:01:29 -0700 Subject: [PATCH] Fix empty mac .toc generation If a shared library has no exported symbols grep will return exit code 1 meaning no matches, but this should not be considered an error during toc generation. Test: external/clang/build.py Change-Id: If589da38ad8b844fe1aff4738481cebea75cca42 --- core/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/config.mk b/core/config.mk index da4784f172..e79a28ee41 100644 --- a/core/config.mk +++ b/core/config.mk @@ -225,7 +225,7 @@ endef # Commands to generate .toc file from Darwin dynamic library. define _gen_toc_command_for_macho $(hide) otool -l $(1) | grep LC_ID_DYLIB -A 5 > $(2) -$(hide) nm -gP $(1) | cut -f1-2 -d" " | grep -v U$$ >> $(2) +$(hide) nm -gP $(1) | cut -f1-2 -d" " | (grep -v U$$ >> $(2) || true) endef combo_target := HOST_