From addbf58217d9aa3709c48d8821b256d726aefa5b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 1 Jun 2016 14:54:32 +0200 Subject: Pass -fvisibility-inlines-hidden to g++ This reduces the number of symbols by about 10%. Unfortunately, it does not seem to cover all the weird std::vector and friend template expansions. ABI should not brake due to that change: It was never specified before whether an inline symbol was exported or not; so no library could rely on its presence. Instead, the symbols were exported in each library/program needing it and and then merged into a common one by the dynamic linker. Also update the symbol files to account for the removed symbols. --- buildlib/environment.mak.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'buildlib') diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index 9620722de..2ac3d6847 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -19,6 +19,8 @@ CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-inc #CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr # a bit too pedantic to be run by default #CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros +# hide inlines +CXXFLAGS+= -fvisibility-inlines-hidden NUM_PROCS = @NUM_PROCS@ # Linker stuff -- cgit v1.2.3