The patch http://reviews.llvm.org/D20896 add check for 64 bit atomic operations in LLVM CheckAtomic.cmake module. We can than used this module to figure out whether we need to link with libatomic.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
The CheckAtomic.cmake module (http://reviews.llvm.org/D20896) in llvm will set HAVE_CXX_LIBATOMICS64 if library exit and atomics work with it. This value then can be read from LLVM CMake cache.
Comment Actions
Have you tried a standalone build? I suspect HAVE_CXX_LIBATOMICS64 will never be set for that case. If that's the case, adding 'include(CheckAtomic)' will probably fix it.
Comment Actions
I never tried a standalone build. Please can you shared standalone build steps (I can't find any doc's for that) ?
Thanks
Comment Actions
I haven't used it that way either and I'm not sure it's a supported build for libcxx but most LLVM projects support a standalone build as far as I know. Can someone from the libcxx project confirm whether standalone builds are supported?