Index: compiler-rt/trunk/cmake/config-ix.cmake =================================================================== --- compiler-rt/trunk/cmake/config-ix.cmake +++ compiler-rt/trunk/cmake/config-ix.cmake @@ -208,7 +208,7 @@ set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64} ${S390X}) set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64}) -set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64}) +set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS64}) set(ALL_ESAN_SUPPORTED_ARCH ${X86_64} ${MIPS64}) set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} powerpc64le) Index: compiler-rt/trunk/test/cfi/cross-dso/lit.local.cfg =================================================================== --- compiler-rt/trunk/test/cfi/cross-dso/lit.local.cfg +++ compiler-rt/trunk/test/cfi/cross-dso/lit.local.cfg @@ -5,5 +5,5 @@ root = getRoot(config) -if root.host_os not in ['Linux']: +if root.host_os not in ['Linux'] or config.android: config.unsupported = True Index: compiler-rt/trunk/test/cfi/lit.cfg =================================================================== --- compiler-rt/trunk/test/cfi/lit.cfg +++ compiler-rt/trunk/test/cfi/lit.cfg @@ -5,8 +5,8 @@ config.suffixes = ['.c', '.cpp', '.test'] config.test_source_root = os.path.dirname(__file__) -clang = ' '.join([config.clang, config.target_cflags]) -clangxx = ' '.join([config.clang, config.target_cflags] + config.cxx_mode_flags) +clang = ' '.join([config.compile_wrapper, config.clang, config.target_cflags]) +clangxx = ' '.join([config.compile_wrapper, config.clang, config.target_cflags] + config.cxx_mode_flags) config.substitutions.append((r"%clang ", clang + ' ')) config.substitutions.append((r"%clangxx ", clangxx + ' ')) Index: compiler-rt/trunk/test/cfi/stats.cpp =================================================================== --- compiler-rt/trunk/test/cfi/stats.cpp +++ compiler-rt/trunk/test/cfi/stats.cpp @@ -5,6 +5,9 @@ // FIXME: We currently emit the wrong debug info under devirtualization. // UNSUPPORTED: devirt +// FIXME: %t.stats must be transferred from device to host for this to work on Android. +// XFAIL: android + struct ABase {}; struct A : ABase { Index: compiler-rt/trunk/test/lit.common.cfg =================================================================== --- compiler-rt/trunk/test/lit.common.cfg +++ compiler-rt/trunk/test/lit.common.cfg @@ -55,7 +55,7 @@ # BFD linker in 64-bit android toolchains fails to find libm.so, which is a # transitive shared library dependency (via asan runtime). if config.android: - config.target_cflags += " -fuse-ld=gold -Wl,--enable-new-dtags" + config.target_cflags += " -pie -fuse-ld=gold -Wl,--enable-new-dtags" # Clear some environment variables that might affect Clang. possibly_dangerous_env_vars = ['ASAN_OPTIONS', 'DFSAN_OPTIONS', 'LSAN_OPTIONS', Index: compiler-rt/trunk/test/sanitizer_common/android_commands/android_run.py =================================================================== --- compiler-rt/trunk/test/sanitizer_common/android_commands/android_run.py +++ compiler-rt/trunk/test/sanitizer_common/android_commands/android_run.py @@ -12,7 +12,7 @@ # Android linker ignores RPATH. Set LD_LIBRARY_PATH to Output dir. args.append('LD_LIBRARY_PATH=%s' % (ANDROID_TMPDIR,)) for (key, value) in os.environ.items(): - if key in ['ASAN_OPTIONS', 'ASAN_ACTIVATION_OPTIONS', 'SCUDO_OPTIONS']: + if key in ['ASAN_OPTIONS', 'ASAN_ACTIVATION_OPTIONS', 'SCUDO_OPTIONS', 'UBSAN_OPTIONS']: args.append('%s="%s"' % (key, value)) return ' '.join(args) Index: compiler-rt/trunk/test/ubsan/CMakeLists.txt =================================================================== --- compiler-rt/trunk/test/ubsan/CMakeLists.txt +++ compiler-rt/trunk/test/ubsan/CMakeLists.txt @@ -35,7 +35,7 @@ if(COMPILER_RT_HAS_MSAN AND ";${MSAN_SUPPORTED_ARCH};" MATCHES ";${arch};") add_ubsan_testsuite("MemorySanitizer" msan ${arch}) endif() - if(COMPILER_RT_HAS_TSAN AND ";${TSAN_SUPPORTED_ARCH};" MATCHES ";${arch};") + if(COMPILER_RT_HAS_TSAN AND ";${TSAN_SUPPORTED_ARCH};" MATCHES ";${arch};" AND NOT ANDROID) add_ubsan_testsuite("ThreadSanitizer" tsan ${arch}) endif() endforeach() Index: compiler-rt/trunk/test/ubsan/TestCases/Integer/suppressions.cpp =================================================================== --- compiler-rt/trunk/test/ubsan/TestCases/Integer/suppressions.cpp +++ compiler-rt/trunk/test/ubsan/TestCases/Integer/suppressions.cpp @@ -3,6 +3,7 @@ // Suppression by symbol name (unsigned-integer-overflow:do_overflow below) // requires the compiler-rt runtime to be able to symbolize stack addresses. // REQUIRES: can-symbolize +// UNSUPPORTED: android // Fails without any suppression. // RUN: %env_ubsan_opts=halt_on_error=1 not %run %t 2>&1 | FileCheck %s Index: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Function/lit.local.cfg =================================================================== --- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Function/lit.local.cfg +++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Function/lit.local.cfg @@ -1,3 +1,3 @@ # The function type checker is only supported on x86 and x86_64 for now. -if config.root.host_arch not in ['x86', 'x86_64']: +if config.target_arch not in ['x86', 'x86_64']: config.unsupported = True Index: compiler-rt/trunk/test/ubsan/lit.common.cfg =================================================================== --- compiler-rt/trunk/test/ubsan/lit.common.cfg +++ compiler-rt/trunk/test/ubsan/lit.common.cfg @@ -46,6 +46,9 @@ # much slower. Let's override this and run lit tests with 'abort_on_error=0'. default_ubsan_opts += ['abort_on_error=0'] default_ubsan_opts += ['log_to_syslog=0'] +elif config.android: + default_ubsan_opts += ['abort_on_error=0'] + default_ubsan_opts_str = ':'.join(default_ubsan_opts) if default_ubsan_opts_str: config.environment['UBSAN_OPTIONS'] = default_ubsan_opts_str @@ -55,7 +58,7 @@ 'env UBSAN_OPTIONS=' + default_ubsan_opts_str)) def build_invocation(compile_flags): - return " " + " ".join([config.clang] + compile_flags) + " " + return " " + " ".join([config.compile_wrapper, config.clang] + compile_flags) + " " target_cflags = [get_required_attr(config, "target_cflags")] clang_ubsan_cflags += target_cflags