[compiler-rt] r209835 - light up sanitizers for ARM
Timur Iskhodzhanov
timurrrr at google.com
Thu May 29 13:56:00 PDT 2014
See
https://code.google.com/p/address-sanitizer/source/browse/trunk/build/scripts/slave/buildbot_standard.bat
30 мая 2014 г. 0:47 пользователь "Greg Fitzgerald" <gregf at codeaurora.org>
написал:
> Can you please provide steps to reproduce the error? What are you passing
> to CMAKE_C_COMPILER?
>
>
>
> Thanks,
>
> Greg
>
>
>
>
>
> *From:* Timur Iskhodzhanov [mailto:timurrrr at google.com]
> *Sent:* Thursday, May 29, 2014 1:25 PM
> *To:* Greg Fitzgerald
> *Cc:* llvm-commits; Alexey Samsonov; Reid Kleckner
> *Subject:* Re: [compiler-rt] r209835 - light up sanitizers for ARM
>
>
>
> This has broken "check-asan" on my Windows bot which targets X86 only:
> <...>projects/compiler-rt/lib/asan/tests/asan_asm_test.cc
>
> error: unknown target CPU 'armv7-a'
>
> you should probably add "REQUIRES"?
>
>
>
> 2014-05-29 23:01 GMT+04:00 Greg Fitzgerald <gregf at codeaurora.org>:
>
> Author: garious
> Date: Thu May 29 14:01:32 2014
> New Revision: 209835
>
> URL: http://llvm.org/viewvc/llvm-project?rev=209835&view=rev
> Log:
> light up sanitizers for ARM
>
> You can expect the sanitizers to be built under any of the following
> conditions:
>
> 1) CMAKE_C_COMPILER is GCC built to cross-compile to ARM
> 2) CMAKE_C_COMPILER is Clang built to cross-compile to ARM (ARM is default
> target)
> 3) CMAKE_C_COMPILER is Clang and CMAKE_C_FLAGS contains -target and
> --sysroot
>
> Differential Revision: http://reviews.llvm.org/D3794
>
> Modified:
> compiler-rt/trunk/CMakeLists.txt
> compiler-rt/trunk/lib/lsan/CMakeLists.txt
> compiler-rt/trunk/test/asan/CMakeLists.txt
> compiler-rt/trunk/test/ubsan/CMakeLists.txt
>
> Modified: compiler-rt/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/CMakeLists.txt (original)
> +++ compiler-rt/trunk/CMakeLists.txt Thu May 29 14:01:32 2014
> @@ -215,9 +215,9 @@ else()
> test_target_arch(i386 ${TARGET_32_BIT_CFLAGS})
> elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC")
> test_target_arch(powerpc64 ${TARGET_64_BIT_CFLAGS})
> - elseif("${LLVM_NATIVE_ARCH}" STREQUAL "ARM")
> - test_target_arch(arm "")
> endif()
> + test_target_arch(arm "-march=armv7-a")
> + test_target_arch(aarch64 "-march=armv8-a")
> endif()
>
> # We support running instrumented tests when we're not cross compiling
> @@ -347,14 +347,14 @@ endif()
> # Architectures supported by Sanitizer runtimes. Specific sanitizers may
> # support only subset of these (e.g. TSan works on x86_64 only).
> filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
> - x86_64 i386 powerpc64 arm)
> -filter_available_targets(ASAN_SUPPORTED_ARCH x86_64 i386 powerpc64)
> + x86_64 i386 powerpc64 arm aarch64)
> +filter_available_targets(ASAN_SUPPORTED_ARCH x86_64 i386 powerpc64 arm)
> filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64)
> filter_available_targets(LSAN_SUPPORTED_ARCH x86_64)
> filter_available_targets(MSAN_SUPPORTED_ARCH x86_64)
> -filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 arm)
> +filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 arm aarch64)
> filter_available_targets(TSAN_SUPPORTED_ARCH x86_64)
> -filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386)
> +filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 arm aarch64)
>
> add_subdirectory(include)
>
>
> Modified: compiler-rt/trunk/lib/lsan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/lsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/lsan/CMakeLists.txt Thu May 29 14:01:32 2014
> @@ -19,7 +19,7 @@ set(LSAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_
> # The common files need to build on every arch supported by ASan.
> # (Even if they build into dummy object files.)
> filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH
> - x86_64 i386 powerpc64 arm)
> + x86_64 i386 powerpc64 arm aarch64)
>
> add_custom_target(lsan)
>
>
> Modified: compiler-rt/trunk/test/asan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/test/asan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/test/asan/CMakeLists.txt Thu May 29 14:01:32 2014
> @@ -34,6 +34,21 @@ if(CAN_TARGET_arm)
> list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/ARMLinuxConfig)
> endif()
>
> +if(CAN_TARGET_aarch64)
> + # This is only true if we are cross-compiling.
> + # Build all tests with host compiler and use host tools.
> + set(ASAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
> + set(ASAN_TEST_TARGET_CFLAGS ${COMPILER_RT_TEST_COMPILER_CFLAGS})
> + set(ASAN_TEST_CONFIG_SUFFIX "-aarch64-linux")
> + set(ASAN_TEST_BITS "64")
> + set(ASAN_TEST_DYNAMIC False)
> + configure_lit_site_cfg(
> + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
> + ${CMAKE_CURRENT_BINARY_DIR}/AArch64LinuxConfig/lit.site.cfg
> + )
> + list(APPEND ASAN_TESTSUITES
> ${CMAKE_CURRENT_BINARY_DIR}/AArch64LinuxConfig)
> +endif()
> +
> if(CAN_TARGET_x86_64 OR CAN_TARGET_powerpc64)
> set(ASAN_TEST_CONFIG_SUFFIX "64")
> set(ASAN_TEST_BITS "64")
>
> Modified: compiler-rt/trunk/test/ubsan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/test/ubsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/test/ubsan/CMakeLists.txt Thu May 29 14:01:32 2014
> @@ -4,11 +4,15 @@ set(UBSAN_LIT_TEST_MODE "Standalone")
> configure_lit_site_cfg(
> ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
> ${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig/lit.site.cfg)
> +set(UBSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig)
>
> -set(UBSAN_LIT_TEST_MODE "AddressSanitizer")
> -configure_lit_site_cfg(
> - ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
> - ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)
> +if(ASAN_SUPPORTED_ARCH)
> + set(UBSAN_LIT_TEST_MODE "AddressSanitizer")
> + configure_lit_site_cfg(
> + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
> + ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)
> + list(APPEND UBSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig)
> +endif()
>
> set(UBSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
> if(NOT COMPILER_RT_STANDALONE_BUILD)
> @@ -16,7 +20,6 @@ if(NOT COMPILER_RT_STANDALONE_BUILD)
> endif()
>
> add_lit_testsuite(check-ubsan "Running UndefinedBehaviorSanitizer tests"
> - ${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig
> - ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig
> + ${UBSAN_TESTSUITES}
> DEPENDS ${UBSAN_TEST_DEPS})
> set_target_properties(check-ubsan PROPERTIES FOLDER "UBSan unittests")
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140530/9fc37a64/attachment.html>
More information about the llvm-commits
mailing list