Add function and data sections when building llvm, clang, lld and lldb,

and allow the linker to garbage collect them.  This shaves off up to a
few MB from the final executables.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2017-04-20 21:00:09 +00:00
parent c83fca58fa
commit bcfe4c376c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317215

View File

@ -40,6 +40,10 @@ CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\"
CFLAGS+= -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\"
CFLAGS+= -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\"
CFLAGS+= -ffunction-sections
CFLAGS+= -fdata-sections
LDFLAGS+= -Wl,--gc-sections
CXXFLAGS+= -std=c++11
CXXFLAGS+= -fno-exceptions
CXXFLAGS+= -fno-rtti