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:
parent
c83fca58fa
commit
bcfe4c376c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user