[CMake] Make sure we built one variant of i386/i686 runtime libraries.
authorAlexey Samsonov <vonosmas@gmail.com>
Thu, 26 Feb 2015 21:03:41 +0000 (21:03 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Thu, 26 Feb 2015 21:03:41 +0000 (21:03 +0000)
llvm-svn: 230683

compiler-rt/cmake/config-ix.cmake
compiler-rt/lib/asan/CMakeLists.txt
compiler-rt/lib/ubsan/CMakeLists.txt

index 48f9117..9c4c8de 100644 (file)
@@ -161,8 +161,10 @@ else()
   if("${LLVM_NATIVE_ARCH}" STREQUAL "X86")
     if(NOT MSVC)
       test_target_arch(x86_64 "" "-m64")
-      test_target_arch(i386 __i386__ "-m32")
       test_target_arch(i686 __i686__ "-m32")
+      if(NOT CAN_TARGET_i686)
+        test_target_arch(i386 __i386__ "-m32")
+      endif()
     else()
       test_target_arch(i386 "" "")
     endif()
index d4c5c17..90cb6f8 100644 (file)
@@ -147,7 +147,7 @@ else()
     target_link_libraries(clang_rt.asan-dynamic-${arch} ${ASAN_DYNAMIC_LIBS})
     add_dependencies(asan clang_rt.asan-dynamic-${arch})
 
-    if (UNIX AND NOT ${arch} STREQUAL "i386" AND NOT ${arch} STREQUAL "i686")
+    if (UNIX AND NOT ${arch} MATCHES "i386|i686")
       add_sanitizer_rt_symbols(clang_rt.asan_cxx-${arch})
       add_dependencies(asan clang_rt.asan_cxx-${arch}-symbols)
       add_sanitizer_rt_symbols(clang_rt.asan-${arch} asan.syms.extra)
index 09c7a85..6683272 100644 (file)
@@ -44,7 +44,7 @@ else()
       clang_rt.san-${arch}
       clang_rt.ubsan-${arch}
       clang_rt.ubsan_cxx-${arch})
-    if (UNIX AND NOT ${arch} STREQUAL "i386" AND NOT ${arch} STREQUAL "i686")
+    if (UNIX AND NOT ${arch} MATCHES "i386|i686")
       add_sanitizer_rt_symbols(clang_rt.ubsan-${arch} ubsan.syms.extra)
       add_sanitizer_rt_symbols(clang_rt.ubsan_cxx-${arch} ubsan.syms.extra)
       add_dependencies(ubsan