[compiler-rt] r262770 - [cmake] Address Samsonov's post-commit review of r262723

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 5 12:27:35 PST 2016


In the future it might be best to make the commit message self explanatory
so that the content just the patch can be understood at a glance, rather
than only in reference/by reading the post commit review comments in the
mailing list (also handy to mention those for extra context, but they're a
bit awkward as the only context)
On Mar 5, 2016 2:05 AM, "Filipe Cabecinhas via llvm-commits" <
llvm-commits at lists.llvm.org> wrote:

> Author: filcab
> Date: Sat Mar  5 04:01:04 2016
> New Revision: 262770
>
> URL: http://llvm.org/viewvc/llvm-project?rev=262770&view=rev
> Log:
> [cmake] Address Samsonov's post-commit review of r262723
>
> Reviewers: samsonov
>
> Subscribers: llvm-commits
>
> Differential Revision: http://reviews.llvm.org/D17896
>
> Modified:
>     compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
>     compiler-rt/trunk/cmake/config-ix.cmake
>     compiler-rt/trunk/lib/asan/CMakeLists.txt
>     compiler-rt/trunk/lib/dfsan/CMakeLists.txt
>     compiler-rt/trunk/lib/interception/CMakeLists.txt
>     compiler-rt/trunk/lib/lsan/CMakeLists.txt
>     compiler-rt/trunk/lib/msan/CMakeLists.txt
>     compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
>     compiler-rt/trunk/lib/tsan/CMakeLists.txt
>     compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt
>     compiler-rt/trunk/lib/ubsan/CMakeLists.txt
>
> Modified: compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake (original)
> +++ compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake Sat Mar  5
> 04:01:04 2016
> @@ -45,9 +45,14 @@ macro(append_string_if condition value)
>    endif()
>  endmacro()
>
> -macro(append_no_rtti_flag list)
> -  append_list_if(COMPILER_RT_HAS_FNO_RTTI_FLAG -fno-rtti ${list})
> -  append_list_if(COMPILER_RT_HAS_GR_FLAG /GR- ${list})
> +macro(append_rtti_flag polarity list)
> +  if(polarity)
> +    append_list_if(COMPILER_RT_HAS_FRTTI_FLAG -frtti ${list})
> +    append_list_if(COMPILER_RT_HAS_GR_FLAG /GR ${list})
> +  else()
> +    append_list_if(COMPILER_RT_HAS_FNO_RTTI_FLAG -fno-rtti ${list})
> +    append_list_if(COMPILER_RT_HAS_GR_FLAG /GR- ${list})
> +  endif()
>  endmacro()
>
>  macro(append_have_file_definition filename varname list)
>
> Modified: compiler-rt/trunk/cmake/config-ix.cmake
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/cmake/config-ix.cmake (original)
> +++ compiler-rt/trunk/cmake/config-ix.cmake Sat Mar  5 04:01:04 2016
> @@ -21,6 +21,7 @@ check_cxx_compiler_flag(-funwind-tables
>  check_cxx_compiler_flag(-fno-stack-protector
> COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG)
>  check_cxx_compiler_flag(-fno-sanitize=safe-stack
> COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG)
>  check_cxx_compiler_flag(-fvisibility=hidden
> COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG)
> +check_cxx_compiler_flag(-frtti               COMPILER_RT_HAS_FRTTI_FLAG)
>  check_cxx_compiler_flag(-fno-rtti
> COMPILER_RT_HAS_FNO_RTTI_FLAG)
>  check_cxx_compiler_flag(-ffreestanding
>  COMPILER_RT_HAS_FFREESTANDING_FLAG)
>  check_cxx_compiler_flag("-Werror -fno-function-sections"
> COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG)
>
> Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/asan/CMakeLists.txt Sat Mar  5 04:01:04 2016
> @@ -32,7 +32,7 @@ set(ASAN_PREINIT_SOURCES
>  include_directories(..)
>
>  set(ASAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(ASAN_CFLAGS)
> +append_rtti_flag(OFF ASAN_CFLAGS)
>
>  set(ASAN_COMMON_DEFINITIONS
>    ASAN_HAS_EXCEPTIONS=1)
>
> Modified: compiler-rt/trunk/lib/dfsan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/dfsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/dfsan/CMakeLists.txt Sat Mar  5 04:01:04 2016
> @@ -6,7 +6,7 @@ set(DFSAN_RTL_SOURCES
>    dfsan_custom.cc
>    dfsan_interceptors.cc)
>  set(DFSAN_COMMON_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(DFSAN_COMMON_CFLAGS)
> +append_rtti_flag(OFF DFSAN_COMMON_CFLAGS)
>  # Prevent clang from generating libc calls.
>  append_list_if(COMPILER_RT_HAS_FFREESTANDING_FLAG -ffreestanding
> DFSAN_COMMON_CFLAGS)
>
>
> Modified: compiler-rt/trunk/lib/interception/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/interception/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/interception/CMakeLists.txt Sat Mar  5 04:01:04
> 2016
> @@ -10,7 +10,7 @@ set(INTERCEPTION_SOURCES
>  include_directories(..)
>
>  set(INTERCEPTION_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(INTERCEPTION_CFLAGS)
> +append_rtti_flag(OFF INTERCEPTION_CFLAGS)
>
>  add_compiler_rt_object_libraries(RTInterception
>      OS ${SANITIZER_COMMON_SUPPORTED_OS}
>
> Modified: compiler-rt/trunk/lib/lsan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/lsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/lsan/CMakeLists.txt Sat Mar  5 04:01:04 2016
> @@ -1,7 +1,7 @@
>  include_directories(..)
>
>  set(LSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(LSAN_CFLAGS)
> +append_rtti_flag(OFF LSAN_CFLAGS)
>
>  set(LSAN_COMMON_SOURCES
>    lsan_common.cc
>
> Modified: compiler-rt/trunk/lib/msan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/msan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/msan/CMakeLists.txt Sat Mar  5 04:01:04 2016
> @@ -17,7 +17,7 @@ set(MSAN_RTL_CXX_SOURCES
>
>
>  set(MSAN_RTL_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(MSAN_RTL_CFLAGS)
> +append_rtti_flag(OFF MSAN_RTL_CFLAGS)
>  append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE MSAN_RTL_CFLAGS)
>  # Prevent clang from generating libc calls.
>  append_list_if(COMPILER_RT_HAS_FFREESTANDING_FLAG -ffreestanding
> MSAN_RTL_CFLAGS)
>
> Modified: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Sat Mar  5
> 04:01:04 2016
> @@ -122,7 +122,7 @@ append_have_file_definition(rpc/xdr.h HA
>  append_have_file_definition(tirpc/rpc/xdr.h HAVE_TIRPC_RPC_XDR_H
> SANITIZER_COMMON_DEFINITIONS)
>
>  set(SANITIZER_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(SANITIZER_CFLAGS)
> +append_rtti_flag(OFF SANITIZER_CFLAGS)
>
>  append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=570
>                 SANITIZER_CFLAGS)
>
> Modified: compiler-rt/trunk/lib/tsan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Sat Mar  5 04:01:04 2016
> @@ -6,7 +6,7 @@ set(TSAN_CFLAGS ${SANITIZER_COMMON_CFLAG
>  # SANITIZER_COMMON_CFLAGS contains -fPIC, but it's performance-critical
> for
>  # TSan runtime to be built with -fPIE to reduce the number of register
> spills.
>  append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE TSAN_CFLAGS)
> -append_no_rtti_flag(TSAN_CFLAGS)
> +append_rtti_flag(OFF TSAN_CFLAGS)
>
>  if(COMPILER_RT_TSAN_DEBUG_OUTPUT)
>    # Add extra debug information to TSan runtime. This configuration is
> rarely
>
> Modified: compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt Sat Mar  5 04:01:04 2016
> @@ -3,7 +3,7 @@
>  include_directories(../..)
>
>  set(DD_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(DD_CFLAGS)
> +append_rtti_flag(OFF DD_CFLAGS)
>
>  set(DD_SOURCES
>    dd_rtl.cc
>
> Modified: compiler-rt/trunk/lib/ubsan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/CMakeLists.txt?rev=262770&r1=262769&r2=262770&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/ubsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/ubsan/CMakeLists.txt Sat Mar  5 04:01:04 2016
> @@ -22,18 +22,16 @@ set(UBSAN_CXX_SOURCES
>  include_directories(..)
>
>  set(UBSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(UBSAN_CFLAGS)
> +append_rtti_flag(OFF UBSAN_CFLAGS)
>  append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI
> UBSAN_CFLAGS)
>
>  set(UBSAN_STANDALONE_CFLAGS ${SANITIZER_COMMON_CFLAGS})
> -append_no_rtti_flag(UBSAN_STANDALONE_CFLAGS)
> +append_rtti_flag(OFF UBSAN_STANDALONE_CFLAGS)
>  append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI
> UBSAN_STANDALONE_CFLAGS)
>
>  set(UBSAN_CXXFLAGS ${SANITIZER_COMMON_CFLAGS})
> +append_rtti_flag(ON UBSAN_STANDALONE_CXXFLAGS)
>  append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI
> UBSAN_CXXFLAGS)
> -# Make sure we end with -frtti on type_hash
> -set_property(SOURCE ubsan_type_hash_itanium.cc APPEND_STRING PROPERTY
> -  COMPILE_FLAGS " -frtti")
>
>  add_custom_target(ubsan)
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160305/6d3981f4/attachment.html>


More information about the llvm-commits mailing list