[PATCH] D16583: [tsan] If the default target is not supported, don't build other targets either.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 02:09:56 PST 2016


dsanders added a comment.

> Hm, I'd really like to avoid this crutch, if possible. Do I understand that on MIPS32 platform we are able to build TSan to target MIPS64, but are not able to run tests, or build libcxx


with -fsanitize=thread?

The current state is that on MIPS32, the MIPS32 tsan is unsupported but tries to build a MIPS32 libcxx with -fsanitize=thread anyway (and fails stopping the build). If I hack around that then it tries to run the MIPS32 tsan tests (and fails them all). With the hack it successfully builds a MIPS64 tsan but doesn't attempt to build a MIPS64 libcxx with -fsanitize=thread and doesn't attempt to run the MIPS64 tsan tests.

> If that's the case, I would actually prefer to sink these checks to:

>  (a) test/tsan/CMakeLists.txt to either instantly return from CMakeLists.txt if default target arch is not in TSAN_SUPPORTED_ARCH, or use a loop to configure test suite for all arches in TSAN_SUPPORTED_ARCH like we do for ASan.

>  (b) don't call "add_custom_libcxx" from lib/tsan/CMakeLists.txt if default target arch is unsupported.


My patch started off with the (b) approach. This solved the libcxx problem but it still ran the tsan tests for MIPS32 and failed them all. I later rewrote it using the loop approach in (a) but I couldn't get it to stop running the MIPS32 tests. At this point I decided that rc2 was looming and a hack was better than nothing so I posted this patch.

I kept the probably-good part of the (a) and I'll upload it shortly. The bit it's missing is my attempt to change the configure_lit_site_cfg() calls to skip MIPS32.


http://reviews.llvm.org/D16583





More information about the llvm-commits mailing list