Author: dim
Date: Sat Apr 29 23:26:36 2017
New Revision: 317599
URL: https://svnweb.freebsd.org/changeset/base/317599

Log:
  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.

Modified:
  stable/11/lib/clang/include/llvm/Config/config.h
  stable/11/lib/clang/llvm.build.mk
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/lib/clang/clang.build.mk
  stable/10/lib/clang/include/llvm/Config/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/lib/clang/include/llvm/Config/config.h
==============================================================================
--- stable/11/lib/clang/include/llvm/Config/config.h    Sat Apr 29 21:48:11 
2017        (r317598)
+++ stable/11/lib/clang/include/llvm/Config/config.h    Sat Apr 29 23:26:36 
2017        (r317599)
@@ -12,7 +12,7 @@
 #define BUG_REPORT_URL "https://bugs.freebsd.org/submit/";
 
 /* Define to 1 to enable backtraces, and to 0 otherwise. */
-#define ENABLE_BACKTRACES 1
+#define ENABLE_BACKTRACES 0
 
 /* Define to 1 to enable crash overrides, and to 0 otherwise. */
 #define ENABLE_CRASH_OVERRIDES 1

Modified: stable/11/lib/clang/llvm.build.mk
==============================================================================
--- stable/11/lib/clang/llvm.build.mk   Sat Apr 29 21:48:11 2017        
(r317598)
+++ stable/11/lib/clang/llvm.build.mk   Sat Apr 29 23:26:36 2017        
(r317599)
@@ -40,6 +40,10 @@ CFLAGS+=     -DLLVM_DEFAULT_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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to