Page MenuHomePhabricator

[Libcxx][MIPS] Use LLVM CheckAtomic.cmake module to figure out whether we need to link with libatomic.
AbandonedPublic

Authored by nitesh.jain on Jun 22 2016, 12:45 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

nitesh.jain retitled this revision from to [Libcxx][MIPS] Use LLVM CheckAtomic.cmake module to figure out whether we need to link with libatomic..
nitesh.jain updated this object.
nitesh.jain set the repository for this revision to rL LLVM.
nitesh.jain added subscribers: jaydeep, bhushan, slthakur and 3 others.

Hi Daniel/Vasileios

Please could you find sometime to review this?

Thanks

dsanders edited edge metadata.Jul 12 2016, 3:03 AM

What sets HAVE_CXX_LIBATOMICS64? I don't see a reference to LLVM's CheckAtomic.

What sets HAVE_CXX_LIBATOMICS64? I don't see a reference to LLVM's CheckAtomic.

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.

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.

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.

I never tried a standalone build. Please can you shared standalone build steps (I can't find any doc's for that) ?

Thanks

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?

EricWF edited edge metadata.Dec 30 2016, 4:11 AM

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?

Standalone builds are supported. So this breaks those.

nitesh.jain abandoned this revision.Jan 1 2017, 9:16 PM