[libcxx-commits] [libcxx] [libc++][In progress] Floating Point Atomic (PR #67799)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 13 11:06:37 PDT 2023
================
@@ -0,0 +1,60 @@
+//===----------------------------------------------------------------------===//
----------------
ldionne wrote:
About the test failures with missing symbols from `libatomic`. It seems like the compiler driver on Linux doesn't add `-latomic` automatically even though it is required to write some conforming programs. Either
1. we add `-latomic` to the configurations in `libcxx/test/configs/llvm-libc++-shared.cfg.in` and friends, or
2. we add it just in the tests that need it with `// ADDITIONAL_LINK_FLAGS: -latomic`
3. we add some Lit feature in `features.py` that detects whether `libatomic` exists and we add a link flag in that case
In the case of (2), we would likely need to detect whether `libatomic` is available on the platform, because I am not sure that it's valid to use `-latomic` on all platforms.
I think (3) might be the best approach here since it is the least intrusive, and we have a lot of flexibility in how we can determine what a platform supports, and also in how we can tweak the linker flags. To detect libatomic, you could perhaps try compiling a file with `-latomic` and check if that works.
https://github.com/llvm/llvm-project/pull/67799
More information about the libcxx-commits
mailing list