[cfe-users] Symbol Visibility support?

Jeffrey Walton noloader at gmail.com
Sun Mar 1 18:45:28 PST 2015


I have the following in my makefile to determine when I should use
GCC's visibility features. I'd like to add the same for Clang.

When did Clang add visibility support? What version did it occur?

Thanks in advance.

*****

# https://gcc.gnu.org/wiki/Visibility
GCC40_OR_LATER = $(shell $(CXX) -v 2>&1 | $(EGREP) -c "^gcc version ([4-9])")
ifneq ($(GCC40_OR_LATER),0)
  CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
endif



More information about the cfe-users mailing list