[compiler-rt] lit tests without x86

Are there any sanitizer lit tests in non-X86 configurations? For example:

$ cmake -DLLVM_TARGETS_TO_BUILD=ARM \
   -DLLVM_DEFAULT_TARGET_TRIPLE=arm-none-linux-gnueabi \
   -DLLVM_TARGET_ARCH=arm-none-linux-gnueabi

All ASan tests were removed from the build and all the other
sanitizers have tests but they all fail. Should they all be disabled
too? Or can we add a REQUIRES tag to get lit to mark them as
'unsupported'?

Thanks,
Greg

Yes, I think we should disable sanitizer tests on these platforms. What is the exact line you use to configure build tree, and the output you see?

What is the exact line you use to configure build tree, and the output you see?

cmake ../.. \
    -G Ninja \
    -DCMAKE_INSTALL_PREFIX=ship \
    -DCMAKE_BUILD_TYPE=Release \
    -DLLVM_ENABLE_ASSERTIONS=ON \
    -DLLVM_TARGETS_TO_BUILD=ARM \
    -DLLVM_DEFAULT_TARGET_TRIPLE=arm-none-linux-gnueabi \
    -DLLVM_TARGET_ARCH=arm-none-linux-gnueabi \
    -DLLVM_LIT_ARGS=-v

ninja check-all

Lot's of different errors, but this one stands out (from 'check-tsan'):

   cannot find "bin/../lib/clang/3.4/lib/linux/libclang_rt.tsan-arm.a"

No surprise that library is missing - the ARM Linux runtime doesn't
have enough information to build. We haven't provided compiler-rt
with an ARM linker (or a sysroot). I only know how to do that for the
Android build. How do I build for ARM Linux?

Thanks,
Greg

> What is the exact line you use to configure build tree, and the output
you see?

cmake ../.. \
    -G Ninja \
    -DCMAKE_INSTALL_PREFIX=ship \
    -DCMAKE_BUILD_TYPE=Release \
    -DLLVM_ENABLE_ASSERTIONS=ON \
    -DLLVM_TARGETS_TO_BUILD=ARM \
    -DLLVM_DEFAULT_TARGET_TRIPLE=arm-none-linux-gnueabi \
    -DLLVM_TARGET_ARCH=arm-none-linux-gnueabi \
    -DLLVM_LIT_ARGS=-v

ninja check-all

Lot's of different errors, but this one stands out (from 'check-tsan'):

   cannot find "bin/../lib/clang/3.4/lib/linux/libclang_rt.tsan-arm.a"

No surprise that library is missing - the ARM Linux runtime doesn't
have enough information to build. We haven't provided compiler-rt
with an ARM linker (or a sysroot). I only know how to do that for the
Android build. How do I build for ARM Linux?

TSan is not supported on ARM at all, so we should avoid running any tests
there.
Do I understand correctly that you build Clang that targets ARM on an X86
host?
If yes, then we should modify compiler-rt CMake rules to check if
just-built Clang can target
the host system and avoid running any sanitizer tests otherwise.

Do I understand correctly that you build Clang that targets ARM on an X86 host?

Correct.

If yes, then we should modify compiler-rt CMake rules to check if just-built Clang can target

the host system and avoid running any sanitizer tests otherwise.

Hmm, depends on the tests, I suppose. If the test runs the
executable, then yes it should be disabled (or prefixed with an
emulator (i.e. "qemu-arm -L /usr/arm-linux-gnueabi")). If the test
stops after linking, then you can keep the test in, but it'll assume
the default sysroot matches the default target (seems reasonable to
me). If the test just uses -emit-llvm and check for the expected
instrumentation, then no need to disable it.

TSan is not supported on ARM at all

Is ASan the only sanitizer supported on ARM? Which are next in line? UBSan?

Thanks,
Greg

So, how to run asan test? if I am using cross-compiler on x86 platform and I have only hardware available(no qemu)
for execution. Whether llvm-lit tool supports adding plugin for remote hardware, so that I can do cross-compilation
on x86 platform and do execution on remote hardware.

The above email is reply to an old thread[1], Probably a new thread is started, sorry for that.
[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-October/066952.html