summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/asan/tests/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/tests/CMakeLists.txt b/compiler-rt/lib/asan/tests/CMakeLists.txt
index f0b8b45e4fd..5e36416473f 100644
--- a/compiler-rt/lib/asan/tests/CMakeLists.txt
+++ b/compiler-rt/lib/asan/tests/CMakeLists.txt
@@ -127,10 +127,20 @@ set_target_properties(AsanUnitTests PROPERTIES FOLDER "ASan unit tests")
add_custom_target(AsanBenchmarks)
set_target_properties(AsanBenchmarks PROPERTIES FOLDER "Asan benchmarks")
+if (NOT APPLE)
+# Do not build asan_fake_stack_test.cc on OS X, since it requires exposing
+# additional functions from the runtime.
+# See also https://code.google.com/p/address-sanitizer/issues/detail?id=222
set(ASAN_NOINST_TEST_SOURCES
asan_fake_stack_test.cc
asan_noinst_test.cc
asan_test_main.cc)
+else()
+set(ASAN_NOINST_TEST_SOURCES
+ asan_noinst_test.cc
+ asan_test_main.cc)
+endif()
+
set(ASAN_INST_TEST_SOURCES
asan_globals_test.cc
asan_test.cc
OpenPOWER on IntegriCloud