non-x86 sanitizer buildbots: no rule to make target check-lsan etc.

Hi,

Currently the first stage ("run sanitizer tests in gcc build") of the
sanitizer-ppc64-linux1 buildbot is only failing because of:

+ cd clang_build
+ make -j16 check-lsan
make: *** No rule to make target `check-lsan'. Stop.
+ echo @@@STEP_FAILURE@@@
@@@STEP_FAILURE@@@
+ cd clang_build
+ make -j16 check-msan
make: *** No rule to make target `check-msan'. Stop.
+ echo @@@STEP_FAILURE@@@
@@@STEP_FAILURE@@@
+ cd clang_build
+ make -j16 check-tsan
make: *** No rule to make target `check-tsan'. Stop.
+ echo @@@STEP_FAILURE@@@
@@@STEP_FAILURE@@@
+ cd clang_build
+ make -j16 check-ubsan
make: *** No rule to make target `check-ubsan'. Stop.
+ echo @@@STEP_WARNINGS@@@
@@@STEP_WARNINGS@@@
+ cd clang_build
+ make -j16 check-dfsan
make: *** No rule to make target `check-dfsan'. Stop.
+ echo @@@STEP_WARNINGS@@@
@@@STEP_WARNINGS@@@

The problem is that the buildbot script
(zorg/buildbot/builders/sanitizers/buildbot_cmake.sh) explicitly lists
all the sanitizer check-* targets, but only some of them are supported
on non-x86 configurations. It seems silly for the buildbot script to
duplicate all the logic from compiler-rt's cmake/config-ix.cmake about
which sanitizers are supported on which targets.

Maybe compiler-rt could have a new check-all-compiler-rt target, which
runs the checks for all supported sanitizers? Is it possible to
implement this (it would be a lit target that subsumes a bunch of
other lit targets)?

Any other ideas?

Thanks,
Jay.

I think check-all-compiler-rt target would be useful on its own, but on a buildbot it would result in a single “step” instead of multiple smaller “steps”, and even less informative messages. I don’t really mind, “run sanitizer tests in gcc build” is a single step anyway. I would not want that to happen to the following “check-asan”, “check-msan”, etc steps though.

With ninja, we could filter against “ninja -t targets”.

How about tweaking the compiler-rt cmakefiles so that if lsan is not
supported, the target check-lsan still exists but does nothing? I've
attached a patch that does this. (I don't know much about cmake so
there might be a better way of doing it.)

Alternatively, can I change the zorg build script so that "run
sanitizer tests in gcc build" doesn't try to run check-lsan etc unless
we're on x86-64? I've attached a patch for this too.

I can submit either of these patches via phabricator if you'd prefer.

Thanks,
Jay.

dummy-check-targets (1.11 KB)

zorg-check-lsan-x86-64 (1.3 KB)

The zorg change looks good.

r224704, thanks!