[libcxx-commits] [libcxx] [libc++][test] Workaround for atomic tests linker errors on Linux systems without libatomic.so (PR #73398)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Nov 25 09:30:26 PST 2023
https://github.com/huixie90 updated https://github.com/llvm/llvm-project/pull/73398
>From 72bc94d6f9c297221619e0881fea09c9f2f7ab78 Mon Sep 17 00:00:00 2001
From: Hui <hui.xie0621 at gmail.com>
Date: Fri, 24 Nov 2023 20:09:01 +0000
Subject: [PATCH 1/4] [libc++][test] fix atomic float test CI failure
---
.../atomics.types.float/lockfree.pass.cpp | 3 +--
.../atomics.types.float/assign.pass.cpp | 3 +--
.../compare_exchange_strong.pass.cpp | 2 +-
.../compare_exchange_weak.pass.cpp | 2 +-
.../atomics.types.float/ctor.pass.cpp | 3 +--
.../atomics.types.float/exchange.pass.cpp | 5 ++---
.../atomics.types.float/fetch_add.pass.cpp | 7 +++----
.../atomics.types.float/fetch_sub.pass.cpp | 7 +++----
.../atomics.types.float/load.pass.cpp | 5 ++---
.../atomics.types.float/lockfree.pass.cpp | 3 +--
.../atomics.types.float/notify_all.pass.cpp | 2 +-
.../atomics.types.float/notify_one.pass.cpp | 2 +-
.../atomics.types.float/operator.float.pass.cpp | 3 +--
.../operator.minus_equals.pass.cpp | 5 ++---
.../operator.plus_equals.pass.cpp | 5 ++---
.../atomics.types.float/store.pass.cpp | 4 ++--
.../atomics.types.float/wait.pass.cpp | 4 ++--
libcxx/utils/libcxx/test/features.py | 13 +++++--------
18 files changed, 32 insertions(+), 46 deletions(-)
diff --git a/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp b/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
index 46511530c7c7582..22fd06c3a6dfe80 100644
--- a/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
@@ -6,8 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// static constexpr bool is_always_lock_free = implementation-defined;
// bool is_lock_free() const volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
index 8efb556cb5d99a5..df889106289970b 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
@@ -6,8 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// floating-point-type operator=(floating-point-type) volatile noexcept;
// floating-point-type operator=(floating-point-type) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp
index 839d79d3a411052..d7d2a9d5c56b7c3 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// bool compare_exchange_strong(T& expected, T desired,
// memory_order success, memory_order failure) volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
index 097210cc4a9db26..0c9107ac2d48349 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// bool compare_exchange_weak(T& expected, T desired,
// memory_order success, memory_order failure) volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
index febabb4f2678261..bfd9573dfd5dd15 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
@@ -6,8 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// constexpr atomic() noexcept;
// constexpr atomic(floating-point-type) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
index a8306304280c545..a09804f2e76a5ed 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
@@ -6,11 +6,10 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: tsan
+// XFAIL: target={{x86_64-.*}} && tsan
// XFAIL: target={{x86_64-.*}} && msan
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// T exchange(T, memory_order = memory_order::seq_cst) volatile noexcept;
// T exchange(T, memory_order = memory_order::seq_cst) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
index 0c59b50eb807051..d3aa1772fcc2aa5 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
@@ -6,13 +6,12 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// XFAIL: LIBCXX-AIX-FIXME
+// UNSUPPORTED: LIBCXX-AIX-FIXME
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: tsan
+// XFAIL: target={{x86_64-.*}} && tsan
// Hangs with msan.
// UNSUPPORTED: msan
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// floating-point-type fetch_add(floating-point-type,
// memory_order = memory_order::seq_cst) volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
index 4435e3fc19b4e90..48c9b0b63bee751 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
@@ -6,13 +6,12 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// XFAIL: LIBCXX-AIX-FIXME
+// UNSUPPORTED: LIBCXX-AIX-FIXME
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: tsan
+// XFAIL: target={{x86_64-.*}} && tsan
// Hangs with msan.
// UNSUPPORTED: msan
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// floating-point-type fetch_sub(floating-point-type,
// memory_order = memory_order::seq_cst) volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
index fa085275de2995b..46689291cf3b1f5 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
@@ -6,10 +6,9 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: tsan
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: target={{x86_64-.*}} && tsan
+// XFAIL: !non-lockfree-atomics
// floating-point-type load(memory_order = memory_order::seq_cst) volatile noexcept;
// floating-point-type load(memory_order = memory_order::seq_cst) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
index 447e0f86500272b..03ca1a551740523 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
@@ -6,8 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// static constexpr bool is_always_lock_free = implementation-defined;
// bool is_lock_free() const volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
index e2320ed0b70ed13..f1a325fe2b60cbe 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
@@ -8,7 +8,7 @@
// UNSUPPORTED: no-threads
// XFAIL: availability-synchronization_library-missing
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// void notify_all() volatile noexcept;
// void notify_all() noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
index 058424f5cee0593..8df9cde89999c48 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
@@ -8,7 +8,7 @@
// UNSUPPORTED: no-threads
// XFAIL: availability-synchronization_library-missing
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// void notify_one() volatile noexcept;
// void notify_one() noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
index 54c62ba8d091810..45617ab5c11f94f 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
@@ -6,8 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// operator floating-point-type() volatile noexcept;
// operator floating-point-type() noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
index 23ad0c5c819dc8e..c9424e3563b399b 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// XFAIL: LIBCXX-AIX-FIXME
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// UNSUPPORTED: LIBCXX-AIX-FIXME
+// XFAIL: !non-lockfree-atomics
// Hangs with msan.
// UNSUPPORTED: msan
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
index 0676645fcfa1518..f623c6cd80baad1 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: target={{.+}}-windows-gnu
-// XFAIL: LIBCXX-AIX-FIXME
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// UNSUPPORTED: LIBCXX-AIX-FIXME
+// XFAIL: !non-lockfree-atomics
// Hangs with msan.
// UNSUPPORTED: msan
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
index 0bb1f00840a890f..a754d2af6490403 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: tsan
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: target={{x86_64-.*}} && tsan
+// XFAIL: !non-lockfree-atomics
// void store(floating-point-type, memory_order = memory_order::seq_cst) volatile noexcept;
// void store(floating-point-type, memory_order = memory_order::seq_cst) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
index 15f3613245a836e..9c46b0ef43445b2 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
@@ -8,9 +8,9 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// XFAIL: availability-synchronization_library-missing
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: tsan
+// XFAIL: target={{x86_64-.*}} && tsan
// XFAIL: target={{x86_64-.*}} && msan
-// ADDITIONAL_COMPILE_FLAGS(has-latomic): -latomic
+// XFAIL: !non-lockfree-atomics
// void wait(T old, memory_order order = memory_order::seq_cst) const volatile noexcept;
// void wait(T old, memory_order order = memory_order::seq_cst) const noexcept;
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index e854aed66513806..19d36f09433d758 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -111,14 +111,11 @@ def _getAndroidDeviceApi(cfg):
when=lambda cfg: hasCompileFlag(cfg, "-Xclang -verify-ignore-unexpected"),
),
Feature(
- name="has-latomic",
- when=lambda cfg: sourceBuilds(
- cfg,
- """
- int main(int, char**) { return 0; }
- """,
- ["-latomic"],
- ),
+ name="add-latomic-workaround", # https://github.com/llvm/llvm-project/issues/73361
+ when=lambda cfg: sourceBuilds(cfg, "int main(int, char**) { return 0; }", ["-latomic"]),
+ actions=[
+ AddLinkFlag("-latomic")
+ ],
),
Feature(
name="non-lockfree-atomics",
>From 62f45df98ad307db370b5e5ab77c124fee6f6cc7 Mon Sep 17 00:00:00 2001
From: Hui <hui.xie0621 at gmail.com>
Date: Fri, 24 Nov 2023 20:25:41 +0000
Subject: [PATCH 2/4] format
---
libcxx/utils/libcxx/test/features.py | 76 ++++++++++++++++++++--------
1 file changed, 55 insertions(+), 21 deletions(-)
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 19d36f09433d758..753ba7aae02e4d1 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -13,22 +13,34 @@
import subprocess
import sys
-_isClang = lambda cfg: "__clang__" in compilerMacros(cfg) and "__apple_build_version__" not in compilerMacros(cfg)
+_isClang = lambda cfg: "__clang__" in compilerMacros(
+ cfg
+) and "__apple_build_version__" not in compilerMacros(cfg)
_isAppleClang = lambda cfg: "__apple_build_version__" in compilerMacros(cfg)
-_isGCC = lambda cfg: "__GNUC__" in compilerMacros(cfg) and "__clang__" not in compilerMacros(cfg)
+_isGCC = lambda cfg: "__GNUC__" in compilerMacros(
+ cfg
+) and "__clang__" not in compilerMacros(cfg)
_isMSVC = lambda cfg: "_MSC_VER" in compilerMacros(cfg)
-_msvcVersion = lambda cfg: (int(compilerMacros(cfg)["_MSC_VER"]) // 100, int(compilerMacros(cfg)["_MSC_VER"]) % 100)
+_msvcVersion = lambda cfg: (
+ int(compilerMacros(cfg)["_MSC_VER"]) // 100,
+ int(compilerMacros(cfg)["_MSC_VER"]) % 100,
+)
def _getSuitableClangTidy(cfg):
try:
# If we didn't build the libcxx-tidy plugin via CMake, we can't run the clang-tidy tests.
- if runScriptExitCode(cfg, ["stat %{test-tools}/clang_tidy_checks/libcxx-tidy.plugin"]) != 0:
+ if (
+ runScriptExitCode(
+ cfg, ["stat %{test-tools}/clang_tidy_checks/libcxx-tidy.plugin"]
+ )
+ != 0
+ ):
return None
# TODO MODULES require ToT due module specific fixes.
- if runScriptExitCode(cfg, ['clang-tidy-17 --version']) == 0:
- return 'clang-tidy-17'
+ if runScriptExitCode(cfg, ["clang-tidy-17 --version"]) == 0:
+ return "clang-tidy-17"
# TODO This should be the last stable release.
# LLVM RELEASE bump to latest stable version
@@ -36,7 +48,14 @@ def _getSuitableClangTidy(cfg):
return "clang-tidy-16"
# LLVM RELEASE bump version
- if int(re.search("[0-9]+", commandOutput(cfg, ["clang-tidy --version"])).group()) >= 16:
+ if (
+ int(
+ re.search(
+ "[0-9]+", commandOutput(cfg, ["clang-tidy --version"])
+ ).group()
+ )
+ >= 16
+ ):
return "clang-tidy"
except ConfigurationRuntimeError:
@@ -111,11 +130,11 @@ def _getAndroidDeviceApi(cfg):
when=lambda cfg: hasCompileFlag(cfg, "-Xclang -verify-ignore-unexpected"),
),
Feature(
- name="add-latomic-workaround", # https://github.com/llvm/llvm-project/issues/73361
- when=lambda cfg: sourceBuilds(cfg, "int main(int, char**) { return 0; }", ["-latomic"]),
- actions=[
- AddLinkFlag("-latomic")
- ],
+ name="add-latomic-workaround", # https://github.com/llvm/llvm-project/issues/73361
+ when=lambda cfg: sourceBuilds(
+ cfg, "int main(int, char**) { return 0; }", ["-latomic"]
+ ),
+ actions=[AddLinkFlag("-latomic")],
),
Feature(
name="non-lockfree-atomics",
@@ -219,7 +238,8 @@ def _getAndroidDeviceApi(cfg):
# manages to find binaries to execute.
Feature(
name="executor-has-no-bash",
- when=lambda cfg: runScriptExitCode(cfg, ["%{exec} bash -c 'bash --version'"]) != 0,
+ when=lambda cfg: runScriptExitCode(cfg, ["%{exec} bash -c 'bash --version'"])
+ != 0,
),
Feature(
name="has-clang-tidy",
@@ -234,11 +254,15 @@ def _getAndroidDeviceApi(cfg):
when=_isAppleClang,
),
Feature(
- name=lambda cfg: "apple-clang-{__clang_major__}.{__clang_minor__}".format(**compilerMacros(cfg)),
+ name=lambda cfg: "apple-clang-{__clang_major__}.{__clang_minor__}".format(
+ **compilerMacros(cfg)
+ ),
when=_isAppleClang,
),
Feature(
- name=lambda cfg: "apple-clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(**compilerMacros(cfg)),
+ name=lambda cfg: "apple-clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(
+ **compilerMacros(cfg)
+ ),
when=_isAppleClang,
),
Feature(name="clang", when=_isClang),
@@ -247,11 +271,15 @@ def _getAndroidDeviceApi(cfg):
when=_isClang,
),
Feature(
- name=lambda cfg: "clang-{__clang_major__}.{__clang_minor__}".format(**compilerMacros(cfg)),
+ name=lambda cfg: "clang-{__clang_major__}.{__clang_minor__}".format(
+ **compilerMacros(cfg)
+ ),
when=_isClang,
),
Feature(
- name=lambda cfg: "clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(**compilerMacros(cfg)),
+ name=lambda cfg: "clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(
+ **compilerMacros(cfg)
+ ),
when=_isClang,
),
# Note: Due to a GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104760), we must disable deprecation warnings
@@ -274,11 +302,15 @@ def _getAndroidDeviceApi(cfg):
name=lambda cfg: "gcc-{__GNUC__}".format(**compilerMacros(cfg)), when=_isGCC
),
Feature(
- name=lambda cfg: "gcc-{__GNUC__}.{__GNUC_MINOR__}".format(**compilerMacros(cfg)),
+ name=lambda cfg: "gcc-{__GNUC__}.{__GNUC_MINOR__}".format(
+ **compilerMacros(cfg)
+ ),
when=_isGCC,
),
Feature(
- name=lambda cfg: "gcc-{__GNUC__}.{__GNUC_MINOR__}.{__GNUC_PATCHLEVEL__}".format(**compilerMacros(cfg)),
+ name=lambda cfg: "gcc-{__GNUC__}.{__GNUC_MINOR__}.{__GNUC_PATCHLEVEL__}".format(
+ **compilerMacros(cfg)
+ ),
when=_isGCC,
),
Feature(name="msvc", when=_isMSVC),
@@ -310,13 +342,14 @@ def _getAndroidDeviceApi(cfg):
"_LIBCPP_HAS_NO_WIDE_CHARACTERS": "no-wide-characters",
"_LIBCPP_HAS_NO_TIME_ZONE_DATABASE": "no-tzdb",
"_LIBCPP_HAS_NO_UNICODE": "libcpp-has-no-unicode",
- "_LIBCPP_HAS_NO_STD_MODULES": "libcpp-has-no-std-modules",
+ "_LIBCPP_HAS_NO_STD_MODULES": "libcpp-has-no-std-modules",
"_LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH": "libcpp-pstl-cpu-backend-libdispatch",
}
for macro, feature in macros.items():
DEFAULT_FEATURES.append(
Feature(
- name=lambda cfg, m=macro, f=feature: f + ("={}".format(compilerMacros(cfg)[m]) if compilerMacros(cfg)[m] else ""),
+ name=lambda cfg, m=macro, f=feature: f
+ + ("={}".format(compilerMacros(cfg)[m]) if compilerMacros(cfg)[m] else ""),
when=lambda cfg, m=macro: m in compilerMacros(cfg),
)
)
@@ -430,6 +463,7 @@ def _getAndroidDeviceApi(cfg):
),
]
+
# Detect whether GDB is on the system, has Python scripting and supports
# adding breakpoint commands. If so add a substitution to access it.
def check_gdb(cfg):
>From 5b853ab65db9c759db45f063abe235fc4abe5b12 Mon Sep 17 00:00:00 2001
From: Hui <hui.xie0621 at gmail.com>
Date: Sat, 25 Nov 2023 16:39:40 +0000
Subject: [PATCH 3/4] [libc++][test] atomic tests add latomic workaround
---
.../atomics.types.generic/atomics.types.float/lockfree.pass.cpp | 2 +-
.../atomics.types.generic/atomics.types.float/assign.pass.cpp | 2 +-
.../atomics.types.float/compare_exchange_strong.pass.cpp | 2 +-
.../atomics.types.float/compare_exchange_weak.pass.cpp | 2 +-
.../atomics.types.generic/atomics.types.float/ctor.pass.cpp | 2 +-
.../atomics.types.generic/atomics.types.float/exchange.pass.cpp | 2 +-
.../atomics.types.float/fetch_add.pass.cpp | 2 +-
.../atomics.types.float/fetch_sub.pass.cpp | 2 +-
.../atomics.types.generic/atomics.types.float/load.pass.cpp | 2 +-
.../atomics.types.generic/atomics.types.float/lockfree.pass.cpp | 2 +-
.../atomics.types.float/notify_all.pass.cpp | 2 +-
.../atomics.types.float/notify_one.pass.cpp | 2 +-
.../atomics.types.float/operator.float.pass.cpp | 2 +-
.../atomics.types.float/operator.minus_equals.pass.cpp | 2 +-
.../atomics.types.float/operator.plus_equals.pass.cpp | 2 +-
.../atomics.types.generic/atomics.types.float/store.pass.cpp | 2 +-
.../atomics.types.generic/atomics.types.float/wait.pass.cpp | 2 +-
17 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp b/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
index 22fd06c3a6dfe80..a8f2af2d3e8ddf8 100644
--- a/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// static constexpr bool is_always_lock_free = implementation-defined;
// bool is_lock_free() const volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
index df889106289970b..4f10d0d9cf8ba88 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// floating-point-type operator=(floating-point-type) volatile noexcept;
// floating-point-type operator=(floating-point-type) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp
index d7d2a9d5c56b7c3..845e4d8ba7af1fd 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// bool compare_exchange_strong(T& expected, T desired,
// memory_order success, memory_order failure) volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
index 0c9107ac2d48349..42f3531adedb6f2 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// bool compare_exchange_weak(T& expected, T desired,
// memory_order success, memory_order failure) volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
index bfd9573dfd5dd15..cb66ea5ac2a60a8 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// constexpr atomic() noexcept;
// constexpr atomic(floating-point-type) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
index a09804f2e76a5ed..4bd2aba5e294649 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
@@ -9,7 +9,7 @@
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan
// XFAIL: target={{x86_64-.*}} && msan
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// T exchange(T, memory_order = memory_order::seq_cst) volatile noexcept;
// T exchange(T, memory_order = memory_order::seq_cst) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
index d3aa1772fcc2aa5..82b5dcaaf1971a8 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
@@ -11,7 +11,7 @@
// XFAIL: target={{x86_64-.*}} && tsan
// Hangs with msan.
// UNSUPPORTED: msan
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// floating-point-type fetch_add(floating-point-type,
// memory_order = memory_order::seq_cst) volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
index 48c9b0b63bee751..e6c22515005c9ec 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
@@ -11,7 +11,7 @@
// XFAIL: target={{x86_64-.*}} && tsan
// Hangs with msan.
// UNSUPPORTED: msan
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// floating-point-type fetch_sub(floating-point-type,
// memory_order = memory_order::seq_cst) volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
index 46689291cf3b1f5..553eca7ffe1fd61 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
@@ -8,7 +8,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// floating-point-type load(memory_order = memory_order::seq_cst) volatile noexcept;
// floating-point-type load(memory_order = memory_order::seq_cst) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
index 03ca1a551740523..9e96497ffa5b4ee 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// static constexpr bool is_always_lock_free = implementation-defined;
// bool is_lock_free() const volatile noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
index f1a325fe2b60cbe..3b0b24b26e60865 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
@@ -8,7 +8,7 @@
// UNSUPPORTED: no-threads
// XFAIL: availability-synchronization_library-missing
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// void notify_all() volatile noexcept;
// void notify_all() noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
index 8df9cde89999c48..9f5af77fb98e88e 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
@@ -8,7 +8,7 @@
// UNSUPPORTED: no-threads
// XFAIL: availability-synchronization_library-missing
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// void notify_one() volatile noexcept;
// void notify_one() noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
index 45617ab5c11f94f..5ce0b85c6f22d31 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// operator floating-point-type() volatile noexcept;
// operator floating-point-type() noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
index c9424e3563b399b..eccddc908800782 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: LIBCXX-AIX-FIXME
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// Hangs with msan.
// UNSUPPORTED: msan
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
index f623c6cd80baad1..a2aeb2d45f8f8e8 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: LIBCXX-AIX-FIXME
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// Hangs with msan.
// UNSUPPORTED: msan
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
index a754d2af6490403..351d1ecee39d23e 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
@@ -8,7 +8,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// void store(floating-point-type, memory_order = memory_order::seq_cst) volatile noexcept;
// void store(floating-point-type, memory_order = memory_order::seq_cst) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
index 9c46b0ef43445b2..8a3b7ce5f9557b0 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
@@ -10,7 +10,7 @@
// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan
// XFAIL: target={{x86_64-.*}} && msan
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// void wait(T old, memory_order order = memory_order::seq_cst) const volatile noexcept;
// void wait(T old, memory_order order = memory_order::seq_cst) const noexcept;
>From 2fd59be1104577746e166b7c18f4b4840e55d301 Mon Sep 17 00:00:00 2001
From: Hui <hui.xie0621 at gmail.com>
Date: Sat, 25 Nov 2023 17:30:08 +0000
Subject: [PATCH 4/4] more tests
---
.../atomic_compare_exchange_strong.pass.cpp | 2 +-
.../atomic_compare_exchange_strong_explicit.pass.cpp | 2 +-
.../atomic_compare_exchange_weak.pass.cpp | 2 +-
.../atomic_compare_exchange_weak_explicit.pass.cpp | 2 +-
.../atomics.types.operations.req/atomic_exchange.pass.cpp | 2 +-
.../atomic_exchange_explicit.pass.cpp | 2 +-
.../atomics.types.operations.req/atomic_init.pass.cpp | 2 +-
.../atomics.types.operations.req/atomic_is_lock_free.pass.cpp | 2 +-
.../atomics.types.operations.req/atomic_load.pass.cpp | 2 +-
.../atomics.types.operations.req/atomic_load_explicit.pass.cpp | 2 +-
.../atomics.types.operations.req/atomic_store.pass.cpp | 2 +-
.../atomics.types.operations.req/atomic_store_explicit.pass.cpp | 2 +-
.../atomics.types.operations.wait/atomic_notify_all.pass.cpp | 2 +-
.../atomics.types.operations.wait/atomic_notify_one.pass.cpp | 2 +-
.../atomics.types.operations.wait/atomic_wait.pass.cpp | 2 +-
.../atomics.types.operations.wait/atomic_wait_explicit.pass.cpp | 2 +-
16 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp
index e5cf6aa12dc14d3..cd42c13f0c3eeaf 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp
index f039069b49e942a..b163e19d8e92498 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp
index 93b7ea525f84315..7065e80f5d470f6 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp
index 41967bd3f564655..b5c4ea178357412 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp
index 14d159a498ae7ef..b9cf2861b3c14af 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp
index 976327975f9d6cc..ff2d69381e4eaca 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp
index 4dbf8fb928b8af1..7b20dc13088e59d 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp
index 2cc7a8a0760d03e..e7a7c99b5eb88dd 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !is-lockfree-runtime-function
+// XFAIL: !is-lockfree-runtime-function && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp
index c8d103c180bff20..c303b6dab7af8b3 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp
index cb9dc1a2ec7ac49..b27055021b31c19 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp
index 5915220fd18911a..1c166c5dbd31219 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp
index e9e15a6aeaf5364..65ab2fd1b4caa23 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// <atomic>
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_all.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_all.pass.cpp
index e446bcf5cfc976b..566216bf902e4c2 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_all.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_all.pass.cpp
@@ -8,7 +8,7 @@
//
// UNSUPPORTED: no-threads
// XFAIL: c++03
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// XFAIL: availability-synchronization_library-missing
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_one.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_one.pass.cpp
index fbf89529ac332ff..7d21c64ffcbceed 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_one.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_one.pass.cpp
@@ -8,7 +8,7 @@
//
// UNSUPPORTED: no-threads
// XFAIL: c++03
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// XFAIL: availability-synchronization_library-missing
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp
index f0657a54fc6595d..91ef66ee72f423d 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp
@@ -8,7 +8,7 @@
//
// UNSUPPORTED: no-threads
// XFAIL: c++03
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// XFAIL: availability-synchronization_library-missing
diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait_explicit.pass.cpp
index 0aba0a5d28dbaa6..dd6ce54573ac53f 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait_explicit.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait_explicit.pass.cpp
@@ -8,7 +8,7 @@
//
// UNSUPPORTED: no-threads
// XFAIL: c++03
-// XFAIL: !non-lockfree-atomics
+// XFAIL: !non-lockfree-atomics && !add-latomic-workaround
// XFAIL: availability-synchronization_library-missing
More information about the libcxx-commits
mailing list