Allow building compilerplugins/clang on Mac OS X

(at least against a self-built Clang configured --enable-keep-symbols)

Change-Id: I6e38688c78f78aca1864530042159cdcef7a0694
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index b7d8212..5d09346 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -8,6 +8,8 @@

# Make sure variables in this Makefile do not conflict with other variables (e.g. from gbuild).

CLANG_COMMA :=,

# You may occassionally want to override some of these
CLANGCXX=$(filter-out -m32 -m64,$(CXX))

@@ -86,7 +88,9 @@ $(foreach src, $(CLANGSRC), $(eval $(call clangbuildsrc,$(src),$(CLANGINDIR)/$(s

$(CLANGOUTDIR)/plugin.so: $(CLANGOBJS)
	@echo [build LNK] $(subst $(BUILDDIR)/,,$@)
	$(QUIET)$(CLANGCXX) -shared $(CLANGOBJS) -o $@
	$(QUIET)$(CLANGCXX) -shared $(CLANGOBJS) -o $@ \
		$(if $(filter MACOSX,$(OS)),-Wl$(CLANG_COMMA)-flat_namespace \
			-Wl$(CLANG_COMMA)-undefined -Wl$(CLANG_COMMA)suppress)

# Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes.
$(CLANGOUTDIR)/clang-timestamp: $(CLANGBUILD)/bin/clang