[LLVMdev] [compiler-rt] lit tests without x86

Greg Fitzgerald garious at gmail.com
Tue Oct 29 12:49:13 PDT 2013


> 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




On Tue, Oct 29, 2013 at 11:04 AM, Alexey Samsonov <samsonov at google.com> wrote:
>
> On Tue, Oct 29, 2013 at 10:55 AM, Greg Fitzgerald <garious at gmail.com> wrote:
>>
>> > 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.
>
>>
>>
>> Thanks,
>> Greg
>>
>> On Mon, Oct 28, 2013 at 6:29 PM, Alexey Samsonov <samsonov at google.com>
>> wrote:
>> > 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?
>> >
>> >
>> > On Fri, Oct 25, 2013 at 2:45 PM, Greg Fitzgerald <garious at gmail.com>
>> > wrote:
>> >>
>> >> 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
>> >> _______________________________________________
>> >> LLVM Developers mailing list
>> >> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>> >
>> >
>> >
>> >
>> > --
>> > Alexey Samsonov, MSK
>
>
>
>
> --
> Alexey Samsonov, MSK



More information about the llvm-dev mailing list