[PATCH] [sanitizer][MIPS] Add --target flag for MIPS32
Sagar Thakur
Sagar.Thakur at imgtec.com
Wed May 6 00:10:06 PDT 2015
Addressed review comments
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9249
Files:
cmake/config-ix.cmake
test/asan/CMakeLists.txt
test/sanitizer_common/CMakeLists.txt
test/ubsan/CMakeLists.txt
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -196,11 +196,11 @@
# FIXME: Ideally, we would build the N32 library too.
if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el")
# regex for mipsel, mips64el
- test_target_arch(mipsel "" "-mips32r2")
- test_target_arch(mips64el "" "-mips64r2 -mabi=n64")
+ test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu")
+ test_target_arch(mips64el "" "-mips64r2" "-mabi=n64")
else()
- test_target_arch(mips "" "-mips32r2")
- test_target_arch(mips64 "" "-mips64r2 -mabi=n64")
+ test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
+ test_target_arch(mips64 "" "-mips64r2" "-mabi=n64")
endif()
elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "arm")
test_target_arch(arm "" "-march=armv7-a")
Index: test/asan/CMakeLists.txt
===================================================================
--- test/asan/CMakeLists.txt
+++ test/asan/CMakeLists.txt
@@ -29,6 +29,11 @@
else()
get_target_flags_for_arch(${arch} ASAN_TEST_TARGET_CFLAGS)
endif()
+ set(argstring "")
+ foreach(CFLAG ${ASAN_TEST_TARGET_CFLAGS})
+ set(argstring "${argstring} ${CFLAG}")
+ endforeach()
+ set(ASAN_TEST_TARGET_CFLAGS ${argstring})
if(ANDROID)
set(ASAN_TEST_DYNAMIC True)
else()
Index: test/sanitizer_common/CMakeLists.txt
===================================================================
--- test/sanitizer_common/CMakeLists.txt
+++ test/sanitizer_common/CMakeLists.txt
@@ -29,6 +29,11 @@
else()
get_target_flags_for_arch(${arch} SANITIZER_COMMON_TEST_TARGET_CFLAGS)
endif()
+ set(argstring "")
+ foreach(CFLAG ${SANITIZER_COMMON_TEST_TARGET_CFLAGS})
+ set(argstring "${argstring} ${CFLAG}")
+ endforeach()
+ set(SANITIZER_COMMON_TEST_TARGET_CFLAGS ${argstring})
set(CONFIG_NAME ${tool}-${arch}-${OS_NAME})
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
Index: test/ubsan/CMakeLists.txt
===================================================================
--- test/ubsan/CMakeLists.txt
+++ test/ubsan/CMakeLists.txt
@@ -23,6 +23,11 @@
else()
get_target_flags_for_arch(${arch} UBSAN_TEST_TARGET_CFLAGS)
endif()
+ set(argstring "")
+ foreach(CFLAG ${UBSAN_TEST_TARGET_CFLAGS})
+ set(argstring "${argstring} ${CFLAG}")
+ endforeach()
+ set(UBSAN_TEST_TARGET_CFLAGS ${argstring})
add_ubsan_testsuite("Standalone" ubsan ${arch})
if(COMPILER_RT_HAS_ASAN AND ";${ASAN_SUPPORTED_ARCH};" MATCHES ";${arch};")
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9249.25012.patch
Type: text/x-patch
Size: 2652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150506/826675fe/attachment.bin>
More information about the llvm-commits
mailing list