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
diff --git a/core/config.mk b/core/config.mk
index da4784f..e79a28e 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -225,7 +225,7 @@
# 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_