[compiler-rt] r230683 - [CMake] Make sure we built one variant of i386/i686 runtime libraries.

H.J. Lu hjl.tools at gmail.com
Thu Feb 26 14:59:50 PST 2015


llvm+clang+compiler-rt failed tests with cmake on Linux/x86-64:

/usr/local/bin/ld: cannot find
/export/build/gnu/llvm-clang/build-x86_64-linux/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.asan-i386.a:
No such file or directory
/usr/local/bin/ld: cannot find
/export/build/gnu/llvm-clang/build-x86_64-linux/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.asan_cxx-i386.a:
No such file or directory
clang-3.7: error: linker command failed with exit code 1 (use -v to
see invocation)
gmake[5]: Leaving directory `/export/build/gnu/llvm-clang/build-x86_64-linux'
gmake[5]: *** [projects/compiler-rt/lib/asan/tests/CMakeFiles/Asan-i686-with-calls-Test]
Error 1

On Thu, Feb 26, 2015 at 1:03 PM, Alexey Samsonov <vonosmas at gmail.com> wrote:
> Author: samsonov
> Date: Thu Feb 26 15:03:41 2015
> New Revision: 230683
>
> URL: http://llvm.org/viewvc/llvm-project?rev=230683&view=rev
> Log:
> [CMake] Make sure we built one variant of i386/i686 runtime libraries.
>
> Modified:
>     compiler-rt/trunk/cmake/config-ix.cmake
>     compiler-rt/trunk/lib/asan/CMakeLists.txt
>     compiler-rt/trunk/lib/ubsan/CMakeLists.txt
>
> Modified: compiler-rt/trunk/cmake/config-ix.cmake
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=230683&r1=230682&r2=230683&view=diff
> ==============================================================================
> --- compiler-rt/trunk/cmake/config-ix.cmake (original)
> +++ compiler-rt/trunk/cmake/config-ix.cmake Thu Feb 26 15:03:41 2015
> @@ -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()
>
> Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=230683&r1=230682&r2=230683&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/asan/CMakeLists.txt Thu Feb 26 15:03:41 2015
> @@ -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)
>
> Modified: compiler-rt/trunk/lib/ubsan/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/CMakeLists.txt?rev=230683&r1=230682&r2=230683&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/ubsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/ubsan/CMakeLists.txt Thu Feb 26 15:03:41 2015
> @@ -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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



-- 
H.J.



More information about the llvm-commits mailing list