Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cff9a64a authored by Colin Cross's avatar Colin Cross
Browse files

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
parent 70209ad9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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_