From 0e474360af3bb5dbefd93c45a8d16d9db4260048 Mon Sep 17 00:00:00 2001 From: Kostya Kortchinsky Date: Thu, 26 Jan 2017 22:50:22 +0000 Subject: [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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293220 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e8326f04b..3db41db4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,7 +142,6 @@ append_list_if(COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG -fno-stack-protector SAN 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) -- cgit v1.2.3