reduce libary size by passing -fvisibility-inlines-hidden - closes #1832 - refs #1826

This commit is contained in:
Dane Springmeyer 2013-05-09 14:54:29 -07:00 committed by artemp
parent dd0c4701c5
commit 8897b2b852

View file

@ -1609,7 +1609,7 @@ if not preconfigured:
if env['DEBUG']: if env['DEBUG']:
env.Append(CXXFLAGS = gcc_cxx_flags + '-O0 -fno-inline') env.Append(CXXFLAGS = gcc_cxx_flags + '-O0 -fno-inline')
else: else:
env.Append(CXXFLAGS = gcc_cxx_flags + '-O%s -fno-strict-aliasing -finline-functions -Wno-inline -Wno-parentheses -Wno-char-subscripts' % (env['OPTIMIZATION'])) env.Append(CXXFLAGS = gcc_cxx_flags + '-O%s -fvisibility-inlines-hidden -fno-strict-aliasing -finline-functions -Wno-inline -Wno-parentheses -Wno-char-subscripts' % (env['OPTIMIZATION']))
if env['DEBUG_UNDEFINED']: if env['DEBUG_UNDEFINED']:
env.Append(CXXFLAGS = '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv -fwrapv') env.Append(CXXFLAGS = '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv -fwrapv')
@ -1728,9 +1728,6 @@ if not HELP_REQUESTED:
Export('env') Export('env')
plugin_base = env.Clone() plugin_base = env.Clone()
# for this to work you need:
# if __GNUC__ >= 4
# define MAPNIK_EXP __attribute__ ((visibility ("default")))
#plugin_base.Append(CXXFLAGS='-fvisibility=hidden') #plugin_base.Append(CXXFLAGS='-fvisibility=hidden')
#plugin_base.Append(CXXFLAGS='-fvisibility-inlines-hidden') #plugin_base.Append(CXXFLAGS='-fvisibility-inlines-hidden')