[PATCH] D85691: lld: link libatomic if needed for Timer
Josh Stone via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 15:43:07 PDT 2020
cuviper added a comment.
In D85691#2208323 <https://reviews.llvm.org/D85691#2208323>, @jfb wrote:
> You're probably better off putting the `std::chrono::nanoseconds::rep` behind a lock if it's not always lock free on all platforms. Some platforms just don't have `libatomic`, so this patch might cause other issues.
Wouldn't such a platform get a fatal error in `llvm/cmake/modules/CheckAtomic.cmake`?
================
Comment at: lld/Common/CMakeLists.txt:3
+
+if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
+ list(APPEND LLD_SYSTEM_LIBS atomic)
----------------
MaskRay wrote:
> I don't whether having a space after `if` is prevailing or not, but the space before `)` is uncommon and should be removed.
That was copy-pasted from lldb, but I'll remove these spaces for consistency with the other `if` in this file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85691/new/
https://reviews.llvm.org/D85691
More information about the llvm-commits
mailing list