diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-08-23 11:13:09 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-09-08 17:21:37 +0200 |
commit | ba7431b4fd6c62dd04d252e769e825769accb2a9 (patch) | |
tree | bd136fbb263d2bed7d0b57b63aa61686f4ad19a5 /make/template/main.mk | |
parent | deb18ee9cfa531a87141aea61171c6899ef7d687 (diff) |
Hide all symbols that aren't exported explicitly
In addition to reducing the sizes of all binaries this also helps the optimizer
Diffstat (limited to 'make/template/main.mk')
-rw-r--r-- | make/template/main.mk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/make/template/main.mk b/make/template/main.mk index bdb4d9762..d82e8b27e 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -35,7 +35,7 @@ COMPILER = @COMPILER@ SYSTEM = @SYSTEM@ BUILDPATH = @BUILD_DIR@ SOCKETENGINE = @SOCKETENGINE@ -CORECXXFLAGS = -fPIC -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter -Wshadow +CORECXXFLAGS = -fPIC -fvisibility-inlines-hidden -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter -Wshadow LDLIBS = -lstdc++ CORELDFLAGS = -rdynamic -L. $(LDFLAGS) PICLDFLAGS = -fPIC -shared -rdynamic $(LDFLAGS) @@ -54,6 +54,10 @@ INSTMODE_LIB = 0640 CORECXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute @ENDIF +@IFNEQ $(SYSTEM)-$(COMPILER) darwin-gcc + CORECXXFLAGS += -fvisibility=hidden +@ENDIF + @IFNEQ $(SYSTEM) darwin LDLIBS += -pthread @ENDIF |