This is an archive of the discontinued LLVM Phabricator instance.

[clang-tools-extra] [clangd] Fix detecting atomics in stand-alone builds
ClosedPublic

Authored by mgorny on Dec 23 2018, 12:04 PM.

Details

Summary

Include CheckAtomic CMake module from LLVM in order to detect support
for atomics when building stand-alone. Otherwise,
the HAVE_CXX_ATOMICS64_WITHOUT_LIB variable is undefined and clangd
wrongly attempts to link -latomic on systems not using the library.

Original bug report: https://bugs.gentoo.org/667016

Diff Detail

Event Timeline

mgorny created this revision.Dec 23 2018, 12:04 PM
ilya-biryukov accepted this revision.Jan 3 2019, 5:51 AM

LGTM. Thanks for the fix.

This revision is now accepted and ready to land.Jan 3 2019, 5:51 AM
This revision was automatically updated to reflect the committed changes.