Commit Graph

6308 Commits

Author SHA1 Message Date
Dan Albert 2e090e4884 Reset another globalMemCounter. 2020-04-29 17:15:04 -07:00
Louis Dionne ae3e58517e [libc++] Re-disable DSL test on Windows
This reverts commit 51a60ed14c, since the test still doesn't pass on
Windows. Marking the test as UNSUPORTED	on Windows again until I've
figured out the problem.
2020-04-29 14:21:04 -04:00
Louis Dionne 43a1d0d963 [libc++] NFC: Properly indent nested #ifs in platform_support.h 2020-04-29 12:53:16 -04:00
Louis Dionne 5b97aa14f4 [libc++] Re-disable parts of the failing RU locale tests on Apple
Instead of completely disabling the tests on Apple, which makes them
disabled on all platforms we test (and hence useless), this commit
disables only the assertions that actually fail. I also created a
bug report to track re-enabling them (https://llvm.org/PR45739).
2020-04-29 12:50:58 -04:00
Louis Dionne 5e37cf0adc [libc++] Try re-enabling long-disabled locale tests on Apple platforms
These two locale tests are disabled because they were said to "pass in
an uncontrolled manner on Apple platforms". This commit re-enables them
to see what that means, and whether that is still relevant on the
platforms we test.

Before this commit, the tests were either XFAILed or UNSUPPORTED on
Apple and Linux, which is pretty much all the systems we support. If
the tests truly don't work anywhere, they should be removed instead.
2020-04-29 12:03:05 -04:00
Louis Dionne d7da36c6e0 [libc++] Mark two timed_mutex tests as flaky 2020-04-29 11:52:17 -04:00
Louis Dionne 51a60ed14c [libc++] Try re-enabling DSL test on Windows
The issue we were seeing before should have been fixed by 178a0c80ba.
2020-04-29 11:32:27 -04:00
Louis Dionne 19123a3e08 [libc++] Fix MacOS platform detection broken in Python 3
Since 88af3ddb1e, libc++ will prefer Python 3 when available. It is
available on Apple platforms, so subprocess.check_output will return
bytes instead of str. This lead to comparisons against str to be false,
and the MacOS platform not being detected properly.
2020-04-29 10:00:56 -04:00
Saleem Abdulrasool 216833b32b Revert "Temporarily revert "build: use `find_package(Python3)` if available""
This reverts commit 35edd704e0.

Revert the revert and extend the patch further to account for the use of
the `PYTHONINTERP_FOUND`.
2020-04-29 01:38:08 +00:00
Casey Carter 68b30bc02b [NFC] Correct spelling of "ambiguous" 2020-04-28 14:51:37 -07:00
Louis Dionne 178a0c80ba [libc++] Make sure temporary config files are closed
Otherwise, trying to remove the file triggers an error on Windows.
2020-04-28 17:13:03 -04:00
Saleem Abdulrasool 88af3ddb1e build: update libc++ as there are some bots with integrated build
Some of the builders are building with C++ in the unified build.  Merge
this without review to try to restore the builder.
2020-04-28 20:07:28 +00:00
Raphael Isemann bd2965c9db Revert "Recommit [libc++] Move abs and div into stdlib.h to fix header cycle."
It seems that D74892 still hasn't fixed the issue on the bot. Currently
investigating the bot breakage and meanwhile (again) reverting this...
2020-04-28 20:23:22 +02:00
Louis Dionne 14f07bcab0 [libc++] Avoid using distutils.util in the DSL
Some bots apparently don't have that package.
2020-04-28 13:33:04 -04:00
Louis Dionne 707df4acdc [libc++] Temporarily disable test that fails on Windows 2020-04-28 13:10:12 -04:00
Louis Dionne e82f0a598f [libc++][Take 2] Create a small DSL for defining Lit features and parameters
This allows defining Lit features that can be enabled or disabled based
on compiler support, and parameters that are passed on the command line.

The main benefits are:
- Feature detection is entirely based on the substitutions provided in
  the TestingConfig object, which is simpler and decouples it from the
  complicated compiler emulation infrastructure.
- The syntax is declarative, which makes it easy to see what features
  and parameters are accepted by the test suite. This is significantly
  less entangled than the current config.py logic.
- Since feature detection is based on substitutions, it works really
  well on top of the new format, and custom Lit configurations can be
  created easily without being based on `config.py`.

This commit is a reapplication of 6d58030c8c, which was reverted in
8f24c4b72f because it broke Python 3 support. This re-application
supports Python 3.

Differential Revision: https://reviews.llvm.org/D78381
2020-04-28 10:02:40 -04:00
Eric Fiselier d0846b432c Recommit [libc++] Move abs and div into stdlib.h to fix header cycle.
This relands this commit as it broke the LLDB bot the first time it landed.
See also the discussion on https://reviews.llvm.org/rG82b47b2978405f802a33b00d046e6f18ef6a47be

Since D74892 this code should now also work on macOS.

Original description:

libc++ is careful to not fracture overload sets. When one overload
is visible to a user, all of them should be. Anything less causes
subtle bugs and ODR violations.

Previously, in order to support ::abs and ::div being supplied by
both <cmath> and <cstdlib> we had to do awful things that make
<math.h> and <stdlib.h> have header cycles and be non-modular.
This really breaks with modules.

Specifically the problem was that in C++ ::abs introduces overloads
for floating point numbers, these overloads forward to ::fabs,
which are defined in math.h. Therefore ::abs needed to be in math.h
too. But this required stdlib.h to include math.h and math.h to
include stdlib.h.

To avoid these problems the definitions have been moved to stddef.h
(which math includes), and the floating point overloads of ::abs
have been changed to call __builtin_fabs, which both Clang and GCC
support.
2020-04-28 15:42:36 +02:00
David Zarzycki 8f24c4b72f Revert: [libc++] Create a small DSL for defining Lit features and parameters
This reverts commit 6d58030c8c due to lack
of Python 3 support. As a reminder, the Python community ended their
support for 2.x at the start of 2020.
2020-04-28 08:12:19 -04:00
Casey Carter b4437992ec [libc++][test] Disable test for extension that's unsupportable in C++20
Defining the nested types `reference` and `iterator_concept` of `reverse_iterator<I>` necessarily requires `I` to be complete in C++20. These tests that verify that `std::map<int, X>::reverse_iterator` can be instantiated when `X` is incomplete are going to have a bad time.

Differential Revision: https://reviews.llvm.org/D78944
2020-04-27 13:06:31 -07:00
Louis Dionne 05ef484df5 [libc++] Properly handle --no-execute in the new format
If --no-execute is passed, we shouldn't report XFAIL tests as passing,
or they will be considered to XPASS.
2020-04-27 13:37:39 -04:00
Louis Dionne b640ec007f [libc++] Quote path to the Python executable in ShTest
This is an attempt to unbreak this test on Windows, where paths contain
backslashes that are interpreted as escape characters unless quoted.
2020-04-27 13:07:29 -04:00
Louis Dionne a486edd03a [libc++abi] Assume that libcxx is checked out in the Apple build script
Instead of using the libc++ headers provided alongside the toolchain,
use those in the sibling libcxx directory that we know is checked out.
Before the days of the monorepo, we couldn't assume that the libc++
repository was present when building libcxxabi. Since we can now make
that assumption, it's always better to use the version of libc++ that
is in lockstep with libc++abi, to avoid subtle bugs.
2020-04-27 11:20:11 -04:00
Louis Dionne 6d58030c8c [libc++] Create a small DSL for defining Lit features and parameters
This allows defining Lit features that can be enabled or disabled based
on compiler support, and parameters that are passed on the command line.

The main benefits are:
- Feature detection is entirely based on the substitutions provided in
  the TestingConfig object, which is simpler and decouples it from the
  complicated compiler emulation infrastructure.
- The syntax is declarative, which makes it easy to see what features
  and parameters are accepted by the test suite. This is significantly
  less entangled than the current config.py logic.
- Since feature detection is based on substitutions, it works really
  well on top of the new format, and custom Lit configurations can be
  created easily without being based on `config.py`.

Differential Revision: https://reviews.llvm.org/D78381
2020-04-27 09:56:04 -04:00
Louis Dionne f17eb4ec20 [libc++] Add UNSUPPORTED markup for shared_mutex and shared_timed_mutex tests
The tests were previously disabled entirely whenever availability markup
was enabled. Instead, enable the tests but add the proper UNSUPPORTED
markup.
2020-04-27 04:23:58 -04:00
Louis Dionne e0ae2cc894 [libc++] Mark C++20 Synchronization Library tests as unsupported in C++11
The various headers comprising the C++20 Synchronization Library only
contain something in C++ >= 14, not C++ >= 11.
2020-04-27 03:38:31 -04:00
Louis Dionne 38a9528ca2 [libc++] NFC: Expose a top-level parseScript function in the new format 2020-04-24 16:55:38 -04:00
Louis Dionne a9104f89b1 [libc++] Properly import lit.formats from the new format 2020-04-24 15:47:48 -04:00
Louis Dionne 4de60d955a [libc++] NFC: Refactor the new format substitutions into its own method
This way, we can reuse the substitution logic in the new DSL.
2020-04-24 15:35:57 -04:00
Louis Dionne 4fd92cc475 [libc++] Get rid of pipe in command to check whether verify is supported 2020-04-24 15:30:25 -04:00
Louis Dionne 7f48246175 [libc++] Quietly scp tarballs over with the remote executor
Otherwise, the progress-meter is printed.
2020-04-24 14:47:56 -04:00
Louis Dionne a2fc2207eb [libc++] NFC: Remove unused parameters in the new test format 2020-04-24 11:05:11 -04:00
Louis Dionne f76c42416c [libc++] Improve the detection of whether the blocks runtime is available
The runtime for Blocks may not be available even though the Blocks
language extension _is_ available. Instead of potentially failing,
this commit is much more conservative and assumes the runtime for
Blocks is only provided on Apple platforms.

Differential Revision: https://reviews.llvm.org/D78757
2020-04-24 07:02:21 -04:00
Sergej Jaskiewicz abe827be9e [libcxx] Add FILE_DEPENDENCIES line to the func.blocks.sh.cpp test
This should fix the bots that use ssh.py to execute tests
2020-04-23 23:17:57 +03:00
Louis Dionne d6c95ae6ff [libc++] Update scripts to build libc++/libc++abi for Apple
Also, make sure we test them.
2020-04-23 14:31:04 -04:00
Louis Dionne 2464d8135e [libc++] Make sure we assume merged typeinfo names on Apple
The introduction of LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT changed
the default from =1 (assuming merged typeinfos) to =0 (not assuming
merged typeinfos) on all platforms where at least one other __config_site
macro is defined.

This commit explicitly enables the assumption of merged typeinfo names
on Apple platform to restore the previous behavior, at least until the
underlying issue has been fixed.
2020-04-22 17:35:30 -04:00
Louis Dionne e5291c4ae3 [libc++/abi] Provide an option to turn on forgiving dynamic_cast when building libc++abi
Instead of the ad-hoc #define _LIBCXX_DYNAMIC_FALLBACK, provide an option
to enable the setting when building libc++abi. Also use the occasion to
rename the option to something slightly more descriptive.

Note that in the future, it would be great to simply remove this option
altogether. However, in the meantime, it seems better to have it be an
official option than something ad-hoc.
2020-04-22 16:24:26 -04:00
Louis Dionne cd66970b37 [libc++] Don't try to include <Block.h> when not available 2020-04-22 15:22:12 -04:00
Louis Dionne 430b00954c [libc++] Add support for blocks in std::function
rdar://14390808
2020-04-22 14:58:02 -04:00
Louis Dionne 2d0c9bf55e [libc++] Update the cache for building libc++/libc++abi on Apple 2020-04-22 14:04:50 -04:00
Louis Dionne 8c61114c53 [libc++/abi/unwind] Rename Lit features for no exceptions to 'no-exceptions'
Instead of having different names for the same Lit feature accross code
bases, use the same name everywhere. This NFC commit is in preparation
for a refactor where all three projects will be using the same Lit
feature detection logic, and hence it won't be convenient to use
different names for the feature.

Differential Revision: https://reviews.llvm.org/D78370
2020-04-22 08:25:27 -04:00
David Zarzycki b2f06bd20b [libc++ testing] Fix unused variable warning turned error 2020-04-22 08:05:31 -04:00
Louis Dionne d632587664 [libc++] Do not enable assertions in the dylib in the Apple cache
It turns out that all this time, we've actually been building without
assertions enabled in the dylib. This commit updates the Apple CMake
cache to make it consistent with reality.
2020-04-21 13:12:03 -04:00
Louis Dionne fccc4af658 [libc++] Re-enable warnings in the new format
When the new libc++ test format was enabled, warnings were accidentally
dropped cause they were not part of the %{compile_flags} substitution.
This commit adds them back, however `-Werror` is only used for non-verify
tests (cause it doesn't make sense for verify tests).

This commit is a re-application of 20fd624380, which was reverted in
5ec6fdb058 because it broke the C++03 bot. This failure should have
been fixed in b4fb705e77.
2020-04-21 13:01:08 -04:00
Louis Dionne b4fb705e77 [libc++] Fix warnings with Clang in C++03 2020-04-21 11:03:05 -04:00
Louis Dionne 5ec6fdb058 Revert "[libc++] Re-enable warnings in the new format"
This reverts commit 20fd624380, which broke the C++03 build bot.
I'll have another stab at this after fixing those failures.
2020-04-20 16:42:53 -04:00
Louis Dionne 20fd624380 [libc++] Re-enable warnings in the new format
When the new libc++ test format was enabled, warnings were accidentally
dropped cause they were not part of the %{compile_flags} substitution.
This commit adds them back, however `-Werror` is only used for non-verify
tests (cause it doesn't make sense for verify tests).
2020-04-20 16:02:49 -04:00
Louis Dionne 1cac82cf38 [libc++] Fix a few warnings when running the test suite with GCC 2020-04-20 13:48:50 -04:00
Zola Bridges 0f12480bd1 [dfsan] Add "DataFlow" option to LLVM_USE_SANITIZER
Summary:
This patch add the dataflow option to LLVM_USE_SANITIZER and documents
it.

Tested via check-cxx (wip to fix the errors).

Reviewers: morehouse, #libc!

Subscribers: mgorny, cfe-commits, libcxx-commits

Tags: #clang, #libc

Differential Revision: https://reviews.llvm.org/D78390
2020-04-20 10:30:52 -07:00
Zola Bridges 33ad38a925 [libcxx][docs] Clearer mark up for --param
Summary:
When I read this on the website it looks like the `--` in the used font turns
into an em dash. I updated this with inline literal mark up so the `--` will
remain obvious.

Reviewers: EricWF, #libc!

Subscribers: libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D78405
2020-04-20 09:15:04 -07:00
Louis Dionne ecf313c01d [libc++] Fix the no-exceptions build of libc++ on Apple
We previously tried re-exporting symbols that didn't exist when
exceptions were disabled. Note that building libc++abi without
exceptions still doesn't work when linking against the default-provided
libSystem.dylib, because it transitively depends on libobjc.dylib,
and that requires __gxx_personality_v0. But building libc++abi
with exceptions and libc++ without exceptions does work.
2020-04-20 10:45:14 -04:00