mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-29 00:21:14 +00:00
[sanitizer][MIPS] Fix warnings on MIPS
Fixed: - stack frame size warning. - msse3 flag unused warning. - GoTsanRuntimeCheck dependency warning reported by cmake. Change by Sagar Thakur Reviewed in http://reviews.llvm.org/D8963 llvm-svn: 234579
This commit is contained in:
parent
f83a92302f
commit
4bf08947a1
@ -238,12 +238,13 @@ if(NOT COMPILER_RT_DEBUG AND NOT MSVC)
|
||||
endif()
|
||||
|
||||
# Determine if we should restrict stack frame sizes.
|
||||
# Stack frames on PowerPC and in debug biuld can be much larger than
|
||||
# Stack frames on PowerPC and Mips and in debug biuld can be much larger than
|
||||
# anticipated.
|
||||
# FIXME: Fix all sanitizers and add -Wframe-larger-than to
|
||||
# SANITIZER_COMMON_FLAGS
|
||||
if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG AND NOT COMPILER_RT_DEBUG
|
||||
AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC")
|
||||
AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC"
|
||||
AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "Mips")
|
||||
set(SANITIZER_LIMIT_FRAME_SIZE TRUE)
|
||||
else()
|
||||
set(SANITIZER_LIMIT_FRAME_SIZE FALSE)
|
||||
|
@ -308,3 +308,10 @@ else()
|
||||
set(COMPILER_RT_HAS_UBSAN FALSE)
|
||||
endif()
|
||||
|
||||
# -msse3 flag is not valid for Mips therefore clang gives a warning
|
||||
# message with -msse3. But check_c_compiler_flags() checks only for
|
||||
# compiler error messages. Therefore COMPILER_RT_HAS_MSSE3_FLAG turns out to be
|
||||
# true on Mips. So we make it false here.
|
||||
if("${LLVM_NATIVE_ARCH}" STREQUAL "Mips")
|
||||
set(COMPILER_RT_HAS_MSSE3_FLAG FALSE)
|
||||
endif()
|
||||
|
@ -1,5 +1,7 @@
|
||||
set(TSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
||||
list(APPEND TSAN_TEST_DEPS GotsanRuntimeCheck)
|
||||
if(NOT ${LLVM_NATIVE_ARCH} STREQUAL "Mips")
|
||||
list(APPEND TSAN_TEST_DEPS GotsanRuntimeCheck)
|
||||
endif()
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND TSAN_TEST_DEPS tsan)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user