summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-08-20 17:32:06 +0000
committerChris Bieneman <beanz@apple.com>2015-08-20 17:32:06 +0000
commitb060760d63c2e9afea2e628ec62b3c5e14a450c5 (patch)
tree9759a09493215b15a2d51ffb9c02e89171fb9873 /lib/sanitizer_common/tests/CMakeLists.txt
parentd5e075d3552c08769d2143e0453d9b3b5c9c0b68 (diff)
downloadcompiler-rt-b060760d63c2e9afea2e628ec62b3c5e14a450c5.tar.gz
[CMake] Fix building unit tests on Darwin
Summary: There are a number of issues with unit tests on Darwin. These patches address the following: * Unit tests should be passed -arch (-m32/-m64 isn't sufficient) * Unit tests should be passed ${DARWIN_osx_CFLAGS} because they're being built for OS X * Test architectures should be filtered based on base system capabilities (i.e. don't try running x86_64h tests on pre-haswell hardware). Reviewers: bogner, filcab, kubabrecka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12174 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests/CMakeLists.txt')
-rw-r--r--lib/sanitizer_common/tests/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sanitizer_common/tests/CMakeLists.txt b/lib/sanitizer_common/tests/CMakeLists.txt
index 76ca78648..f2f2e1f79 100644
--- a/lib/sanitizer_common/tests/CMakeLists.txt
+++ b/lib/sanitizer_common/tests/CMakeLists.txt
@@ -4,6 +4,9 @@ clang_compiler_add_cxx_check()
# FIXME: use SANITIZER_COMMON_SUPPORTED_ARCH here
filter_available_targets(SANITIZER_UNITTEST_SUPPORTED_ARCH x86_64 i386 mips64 mips64el)
+if(APPLE)
+ darwin_filter_host_archs(SANITIZER_UNITTEST_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH)
+endif()
set(SANITIZER_UNITTESTS
sanitizer_allocator_test.cc