[compiler-rt] r293220 - [sanitizer] Remove -fno-function-sections from SANITIZER_COMMON_CFLAGS

Kostya Kortchinsky via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 14:50:23 PST 2017


Author: cryptoad
Date: Thu Jan 26 16:50:22 2017
New Revision: 293220

URL: http://llvm.org/viewvc/llvm-project?rev=293220&view=rev
Log:
[sanitizer] Remove -fno-function-sections from SANITIZER_COMMON_CFLAGS

Summary:
-fno-function-sections was added as a default Sanitizer common cflag with
https://reviews.llvm.org/rL200683, the reasoning behind was that things would
break if linked with --gc-sections.

This appears to not be necessary anymore, as tests pass without, including
function-sections-are-bad.cc. There is a large benefit to having
function-sections when dealing with static libraries in terms of size and
dependencies that go away with --gc-sections.

Reviewers: kcc, eugenis

Reviewed By: eugenis

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D29132

Modified:
    compiler-rt/trunk/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=293220&r1=293219&r2=293220&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Thu Jan 26 16:50:22 2017
@@ -142,7 +142,6 @@ append_list_if(COMPILER_RT_HAS_FNO_STACK
 append_list_if(COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG -fno-sanitize=safe-stack SANITIZER_COMMON_CFLAGS)
 append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SANITIZER_COMMON_CFLAGS)
 append_list_if(COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG -fvisibility-inlines-hidden SANITIZER_COMMON_CFLAGS)
-append_list_if(COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG -fno-function-sections SANITIZER_COMMON_CFLAGS)
 append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SANITIZER_COMMON_CFLAGS)
 
 if(MSVC)




More information about the llvm-commits mailing list