On Fri, Jan 31, 2014 at 1:47 PM, Renato Golin <renato.golin at linaro.org>wrote:> On 31 January 2014 08:50, Alexey Samsonov <samsonov at google.com> wrote: > >> That is, I still don't see what the problem is - it's relatively easy to >> enable building just the compiler-rt library on ARM and not enable building >> sanitizers on ARM. >> > > For some reason, when I added the compiler-rt directory (even before my > CMake changes), the Clang tests *required* the Asan libraries in > lib/clang/3.5/linux, which is why I added it in the first place. I think > this is wrong and should be fixed (though I have no idea how) in the Clang > CMake files. >Huh? What tests are you talking about? I thought that tests for Clang driver verifiy that the command "clang++ -fsanitize=address ...." produce a correct linker invocation (with path to /lib/clang/3.5/linux/libclang_rt.asan-arm.a), but don't actually require the libraries to be built there. If it's not the case, we should fix that.> > With that fixed, I could just enable the RT libs and worry about the Asan > later. Right now, I can't. > > --renato >-- Alexey Samsonov, MSK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140131/7f786168/attachment.html>
On 31 January 2014 09:59, Alexey Samsonov <samsonov at google.com> wrote:> Huh? What tests are you talking about? I thought that tests for Clang > driver verifiy that the command "clang++ -fsanitize=address ...." produce a > correct linker invocation (with path to > /lib/clang/3.5/linux/libclang_rt.asan-arm.a), but don't actually require > the libraries to be built there. If it's not the case, we should fix that. >I got linker errors, since /lib/clang/3.5/linux/libclang_rt.asan-armv7l.a (or arm for that matter) wasn't there, since "arm" is not a recognized architecture. My point is that Clang sanitizer tests should *only* run IFF: 1. Compiler-rt is present AND 2. The architecture is recognized AND 3. The Asan/Lsan/UBsan etc libraries were enabled via some build option (individually checked). I may be wrong, but right now, it seems that they all run once compiler-rt is available. cheers, --renato -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140131/274287c6/attachment.html>
On Fri, Jan 31, 2014 at 2:30 PM, Renato Golin <renato.golin at linaro.org>wrote:> On 31 January 2014 09:59, Alexey Samsonov <samsonov at google.com> wrote: > >> Huh? What tests are you talking about? I thought that tests for Clang >> driver verifiy that the command "clang++ -fsanitize=address ...." produce a >> correct linker invocation (with path to >> /lib/clang/3.5/linux/libclang_rt.asan-arm.a), but don't actually require >> the libraries to be built there. If it's not the case, we should fix that. >> > > I got linker errors, since /lib/clang/3.5/linux/libclang_rt.asan-armv7l.a > (or arm for that matter) wasn't there, since "arm" is not a recognized > architecture. >What tests under tools/clang/test were failing and with what errors? I thought that we usually test Clang with -### option, that is, only look at the args we're going to pass to linker, not actually invoke it.> > My point is that Clang sanitizer tests should *only* run IFF: > > 1. Compiler-rt is present AND > 2. The architecture is recognized AND > 3. The Asan/Lsan/UBsan etc libraries were enabled via some build option > (individually checked). > > I may be wrong, but right now, it seems that they all run once compiler-rt > is available. >I think that Clang tests just shouldn't depend on the presence of compiler-rt and should always run.> > cheers, > --renato >-- Alexey Samsonov, MSK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140131/4fc96329/attachment.html>