Commit Graph

10 Commits

Author SHA1 Message Date
Ivan Krasin
25a93c54f3 Fix libc++ configuration with -fsanitize-coverage
Summary:
a recent change (r280015) in libc++ configuration broke LibFuzzer bot:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/12245

It's not restricted just to that bot; any code that uses the sanitize coverage and configures libc++ hits it.

This CL fixes the issue.

Reviewers: compnerd

Subscribers: aizatsky

Differential Revision: https://reviews.llvm.org/D24116

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280335 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-01 01:38:32 +00:00
Saleem Abdulrasool
eb930a502c libc++: perform configuration checks with -nodefaultlibs
We're compiling libc++ with -nodefaultlibs, so we should also pass this
option during the configuration checks to ensure those checks are
consistent with the actual build.

The primary motivation here is to ease cross-compilation against a
non-standard set of C++ libraries. Previously, the configuration checks
would attempt to link against the standard C++ libraries, which would
cause link failures when cross-compiling, even though the actual library
link would go through correctly (because of the use of -nodefaultlibs
and explicitly specifying any needed libraries). This is more correct
even ignoring the motivation, however.

Patch by Shoaib Meenai!

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280015 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-29 21:33:37 +00:00
Eric Fiselier
5432e3b9a1 Rework libatomic handling in CMake and LIT.
This patch updates the way libc++ handles checking for libatomic, in part
to prepare for https://reviews.llvm.org/D22073.

Changes:
* 'LIBCXX_HAS_ATOMIC_LIB' is now set whenever libatomic is available even libc++
   doesn't need to manually link it.
* 'LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB' is now used to detect when libatomic
   needs to be manually linked.
* 'LIBCXX_HAS_ATOMIC_LIB' now adds 'libatomic' as a available feature in the
   test suite.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@275759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:01:50 +00:00
Eric Fiselier
100ce64c6d Fix PR26622 - Make CheckLibcxxAtomic.cmake use the libc++ headers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-20 00:24:43 +00:00
Vasileios Kalintiris
fea3b21ea9 Issue a warning instead of fatal errors when checks for libatomic fail.
This should fix PR26631, PR26622 and has the nice property that the addition
of the CheckLibcxxAtomic.cmake module acts as an NFC on the platforms of the
reporters (at least for the time being).

As these bug reports explain, CMake fails the atomic check because the
include headers might not exist in the host environment. We could
potentially point to the headers provided by libcxx itself.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260961 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 14:15:27 +00:00
Eric Fiselier
629135a1d4 Rename CheckLibcxxAtomic.cmake variable result names so they don't clash with LLVM
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260531 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 15:52:52 +00:00
Eric Fiselier
df694328f1 Fix r260515 - Correct typos in CMake changes
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260524 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 15:05:56 +00:00
Vasileios Kalintiris
cb6641a497 Re-commit "Introduce a cmake module to figure out whether we need to link with libatomic."
This re-applies commit r260235. However, this time we add -gcc-toolchain
to the compiler's flags when the user has specified the LIBCXX_GCC_TOOLCHAIN
variable.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260515 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 12:43:04 +00:00
Vasileios Kalintiris
1654db495f Revert "Introduce a cmake module to figure out whether we need to link with libatomic."
This reverts commit r260235. It breaks LLVM's bootstrap when building
with a -gcc-toolchain and the system's gcc installation does not provide
the libatomic library and its headers. We should check whether
LIBCXX_GCC_TOOLCHAIN is set and adjust the flags accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260323 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 23:38:28 +00:00
Vasileios Kalintiris
b56fdea386 Introduce a cmake module to figure out whether we need to link with libatomic.
Summary:
This fixes the tests under std/atomics for 32-bit MIPS CPUs where the
8-byte atomic operations call into the libatomic library.

Reviewers: dsanders, mclow.lists, EricWF, jroelofs, joerg

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16613

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 17:00:38 +00:00