[PATCH] [sanitizer][MIPS] Add --target flag for MIPS32
Phabricator
reviews at reviews.llvm.org
Tue May 19 02:11:32 PDT 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9249
Files:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/test/asan/CMakeLists.txt
compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
compiler-rt/trunk/test/ubsan/CMakeLists.txt
Index: compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
+++ compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
@@ -28,6 +28,7 @@
${COMPILER_RT_TEST_COMPILER_CFLAGS})
else()
get_target_flags_for_arch(${arch} SANITIZER_COMMON_TEST_TARGET_CFLAGS)
+ string(REPLACE ";" " " SANITIZER_COMMON_TEST_TARGET_CFLAGS "${SANITIZER_COMMON_TEST_TARGET_CFLAGS}")
endif()
set(CONFIG_NAME ${tool}-${arch}-${OS_NAME})
configure_lit_site_cfg(
Index: compiler-rt/trunk/test/asan/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/test/asan/CMakeLists.txt
+++ compiler-rt/trunk/test/asan/CMakeLists.txt
@@ -28,6 +28,7 @@
set(ASAN_TEST_TARGET_CFLAGS ${COMPILER_RT_TEST_COMPILER_CFLAGS})
else()
get_target_flags_for_arch(${arch} ASAN_TEST_TARGET_CFLAGS)
+ string(REPLACE ";" " " ASAN_TEST_TARGET_CFLAGS "${ASAN_TEST_TARGET_CFLAGS}")
endif()
if(ANDROID)
set(ASAN_TEST_DYNAMIC True)
Index: compiler-rt/trunk/test/ubsan/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/test/ubsan/CMakeLists.txt
+++ compiler-rt/trunk/test/ubsan/CMakeLists.txt
@@ -22,6 +22,7 @@
set(UBSAN_TEST_TARGET_CFLAGS ${COMPILER_RT_TEST_COMPILER_CFLAGS})
else()
get_target_flags_for_arch(${arch} UBSAN_TEST_TARGET_CFLAGS)
+ string(REPLACE ";" " " UBSAN_TEST_TARGET_CFLAGS "${UBSAN_TEST_TARGET_CFLAGS}")
endif()
add_ubsan_testsuite("Standalone" ubsan ${arch})
Index: compiler-rt/trunk/cmake/config-ix.cmake
===================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake
+++ compiler-rt/trunk/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")
@@ -226,6 +226,7 @@
set(${out_var} ${archs} PARENT_SCOPE)
endfunction()
+# Returns a list of architecture specific target cflags in @out_var list.
function(get_target_flags_for_arch arch out_var)
list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX)
if(ARCH_INDEX EQUAL -1)
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9249.26042.patch
Type: text/x-patch
Size: 2929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150519/4ea5c41d/attachment.bin>
More information about the llvm-commits
mailing list