aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/builtins/CMakeLists.txt8
-rw-r--r--lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc2
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index d5a1efe79026..44a660f5d49d 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -38,8 +38,6 @@ set(GENERIC_SOURCES
ashlti3.c
ashrdi3.c
ashrti3.c
- # FIXME: atomic.c may only be compiled if host compiler understands _Atomic
- # atomic.c
clear_cache.c
clzdi2.c
clzsi2.c
@@ -162,6 +160,12 @@ set(GENERIC_SOURCES
umodsi3.c
umodti3.c)
+if(COMPILER_RT_SUPPORTS_ATOMIC_KEYWORD)
+ set(GENERIC_SOURCES
+ ${GENERIC_SOURCES}
+ atomic.c)
+endif()
+
set(MSVC_SOURCES
divsc3.c
divdc3.c
diff --git a/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc b/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc
index 3d5678ab7fb8..4c4d2a8c3fb2 100644
--- a/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc
+++ b/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc
@@ -62,7 +62,9 @@ TEST(Symbolizer, DemangleSwiftAndCXX) {
EXPECT_STREQ("_TtSd", DemangleSwiftAndCXX("_TtSd"));
// Check that the rest demangles properly.
EXPECT_STREQ("f1(char*, int)", DemangleSwiftAndCXX("_Z2f1Pci"));
+#if !SANITIZER_FREEBSD // QoI issue with libcxxrt on FreeBSD
EXPECT_STREQ("foo", DemangleSwiftAndCXX("foo"));
+#endif
EXPECT_STREQ("", DemangleSwiftAndCXX(""));
}
#endif