aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libcxx/Makefile
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-12-31 19:37:35 -0800
committerJo-Philipp Wich <jo@mein.io>2020-01-01 16:59:32 +0100
commit9f7d36d1a995c03a8eaccf10f06f57332bc5c1c0 (patch)
tree24158b4610333700608b0b1ddb37b4e711573ce8 /package/libs/libcxx/Makefile
parent1f8ab1c6406451641c05e8cb1e72f7c173a114a3 (diff)
downloadupstream-9f7d36d1a995c03a8eaccf10f06f57332bc5c1c0.tar.gz
upstream-9f7d36d1a995c03a8eaccf10f06f57332bc5c1c0.tar.bz2
upstream-9f7d36d1a995c03a8eaccf10f06f57332bc5c1c0.zip
libcxx: Add size optimizations
Changed standard to 2a. 2a (as well as 17) contain more constexpr functions, which are evaluated at compile time. This saves space. Added --gc-sections. With the CXXABI change, this now makes the package smaller. With these, size went down to 210845 on mipsel_24kc. Also fixed two small compiler warnings. No real change in behavior. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'package/libs/libcxx/Makefile')
-rw-r--r--package/libs/libcxx/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/libs/libcxx/Makefile b/package/libs/libcxx/Makefile
index 60978bdc31..1d8e502221 100644
--- a/package/libs/libcxx/Makefile
+++ b/package/libs/libcxx/Makefile
@@ -47,7 +47,7 @@ CMAKE_OPTIONS += \
-DLIBCXX_HAS_MUSL_LIBC=$(if $(CONFIG_USE_MUSL),ON,OFF)
TARGET_CXXFLAGS += -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -Wno-attributes -flto
-TARGET_LDFLAGS += -Wl,--as-needed
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto=jobserver
define Build/InstallDev
$(call Build/InstallDev/cmake,$(1))