diff options
author | dim <dim@FreeBSD.org> | 2017-04-29 23:26:36 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2017-04-29 23:26:36 +0000 |
commit | ca050d45e568414f39e74f571da232e4fdd820a1 (patch) | |
tree | 28846245d1b27cc545bcd704966704f51da5bd3b /lib | |
parent | 3461b2f43ea77e059fc3eccda365305fa4f92c9e (diff) | |
download | FreeBSD-src-ca050d45e568414f39e74f571da232e4fdd820a1.zip FreeBSD-src-ca050d45e568414f39e74f571da232e4fdd820a1.tar.gz |
MFC r317214:
Turn off llvm/clang's ENABLE_BACKTRACES setting, since it never worked
properly anyway. (Upstream has reorganized this somewhat in the mean
time, but for proper backtraces we would need llvm-symbolizer in base.)
MFC r317215:
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/clang/clang.build.mk | 4 | ||||
-rw-r--r-- | lib/clang/include/llvm/Config/config.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 7be7efa..732fa37 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -31,7 +31,9 @@ TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.3 BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd10.3 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ - -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" + -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" \ + -ffunction-sections -fdata-sections +LDFLAGS+= -Wl,--gc-sections CXXFLAGS+= -fno-exceptions -fno-rtti .PATH: ${LLVM_SRCS}/${SRCDIR} diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index ce32c50..8842ffa 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -24,7 +24,7 @@ /* #undef DEFAULT_SYSROOT */ /* Define if you want backtraces on crash */ -#define ENABLE_BACKTRACES 1 +#define ENABLE_BACKTRACES 0 /* Define to enable crash handling overrides */ #define ENABLE_CRASH_OVERRIDES 1 |