diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-01-26 22:50:22 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-01-26 22:50:22 +0000 |
commit | 0e474360af3bb5dbefd93c45a8d16d9db4260048 (patch) | |
tree | 80bcda3387ad35b929961302141db550cc505e7a | |
parent | 85a6508b1dedce6bf4ff8ed1900291f7336c9f4e (diff) |
[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
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 0 insertions, 1 deletions
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) |