aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/target.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/build2/target.hxx b/build2/target.hxx
index 10b0eb3..e15b970 100644
--- a/build2/target.hxx
+++ b/build2/target.hxx
@@ -1367,14 +1367,20 @@ namespace build2
static const target_type static_type;
protected:
+
+ // Complain if timestamp is not lock-free unless we were told non-lock-
+ // free is ok.
+ //
+#ifndef BUILD2_ATOMIC_NON_LOCK_FREE
// C++17:
//
// static_assert (atomic<timestamp::rep>::is_always_lock_free,
// "timestamp is not lock-free on this architecture");
-
+ //
#if !defined(ATOMIC_LLONG_LOCK_FREE) || ATOMIC_LLONG_LOCK_FREE != 2
# error timestamp is not lock-free on this architecture
#endif
+#endif
// Note that the value is not used to synchronize any other state so we
// use the release-consume ordering (i.e., we are only interested in the