Commit Graph

431 Commits

Author SHA1 Message Date
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 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 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
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 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
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
Louis Dionne 5eb8d45ab5 [libc++] Use proper shell escaping in the executors
This was originally committed as f8452ddfcc and reverted in 7cb1aa9d93.
The issue was that shell builtins were being escaped too, and apparently
Bash won't execute a builtin when it is quoted e.g. '!'. Instead, it
thinks it's a command and it can't find it.

Re-committing the change with that issue fixed.
2020-04-18 11:22:42 -04:00
Luís Marques 60ce987bf3 [RISCV][PowerPC] Fix google/benchmark benchmark::cycleclock::Now
Cherrypick the upstream fix commit a77d5f7 onto llvm/utils/benchmark
and libcxx/utils/google-benchmark.
This fixes LLVM's 32-bit RISC-V compilation, and the issues
mentioned in https://github.com/google/benchmark/pull/955
An additional cherrypick of ecc1685 fixes some minor formatting
issues introduced by the preceding commit.

Differential Revision: https://reviews.llvm.org/D78084
2020-04-18 09:32:19 +01:00
Louis Dionne 7cb1aa9d93 Revert "[libc++] Use proper shell escaping in the executors"
This reverts f8452ddfcc, which broke some bots. I'll figure out what's
wrong and commit it again.
2020-04-17 17:06:52 -04:00
Louis Dionne f8452ddfcc [libc++] Use proper shell escaping in the executors 2020-04-17 16:46:43 -04:00
Louis Dionne 7d4546e3cf [libc++] Split features for platform detection into its own function
This will allow refactoring how the locales are figured out more easily.
2020-04-17 14:46:36 -04:00
Louis Dionne a7e15b0626 [libc++] List the set of __config_site macros used for features
Instead of creating Lit features for all __config_site macros automatically,
only do so for macros that generate features actually used in the test
suite. This makes it easier to know which ones are supported by the test
suite at a glance.

Note that the `libcpp-abi-version-vN` is dropped altogether, but it
wasn't used anywhere.
2020-04-17 12:23:17 -04:00
Louis Dionne a8e4b7a550 [libc++] NFC: Rename Lit feature for no RTTI to -fno-rtti 2020-04-17 10:37:14 -04:00
Louis Dionne 68587af9ad [libc++] Move handling of convenience substitutions outside of config.py
These substitutions are strongly tied to the operation of the test
format, so it makes sense to have them defined by the test format
instead of the Lit configuration. They should be defined regardless
of which configuration is in use.
2020-04-16 17:30:09 -04:00
Louis Dionne ebd90232fb [libc++] Support arbitrary .sh.X extensions in the new format
This allows writing all kinds of ShTests, for example .sh.py tests for
testing Python code.
2020-04-16 09:55:03 -04:00
Louis Dionne e98c2733d2 [libc++] Remove the ability to run using the internal Lit shell
The new format requires using an external shell, and as we transition
and we can simplify config.py as we transition to the new format. Also,
frankly, I'd be quite surprised if that setting was still working anyway
because we have several .sh.cpp tests that likely don't work in Lit's
internal shell.
2020-04-15 15:37:41 -04:00
Louis Dionne e87c46b162 [libc++] Remove the need for the %{build_module} substitution
Instead of using .sh.cpp tests for the modules tests, use .compile.pass.cpp
and add the -fmodules additional flag.
2020-04-15 13:01:26 -04:00
Louis Dionne 2bed2facdb [libc++] NFC: Remove the %{compile} substitution, which is not used anymore 2020-04-15 12:43:35 -04:00
Louis Dionne 7a6aaf9b23 [libc++] Remove workaround for .fail.cpp tests that don't have clang-verify markup
By renaming .fail.cpp tests that don't need clang-verify to .compile.fail.cpp,
the new test format will not try to compile these tests with clang-verify,
and the old test format will work just the same. However, this allows
removing a workaround that requires parsing each test looking for
clang-verify markup.

After this change, a .fail.cpp test should always have clang-verify markup.
When clang-verify is not supported by the compiler, we will just check that
these tests fail to compile. When clang-verify is supported, these tests
will be compiled with clang-verify whether they have markup or not (so
they should have markup, or they will fail).

This simplifies the test suite and also ensures that all of our .fail.cpp
tests provide clang-verify markup. If it's impossible for a test to have
clang-verify markup, it can be moved to a .compile.fail.cpp test, which
are unconditionally just checked for compilation failure.
2020-04-15 10:53:37 -04:00
Louis Dionne ec442f0996 [libc++] run.py: Create directory hierarchy if it does not exist
This is useful when replaying tests after the fact and the directories
don't exist anymore.
2020-04-14 16:20:58 -04:00
Louis Dionne 509cbc2a8d [libc++] CI: Allow pointing to specific dylib roots during backdeployment testing
This can be useful when the CI jobs don't have internet access.
2020-04-14 15:09:48 -04:00
Louis Dionne 35bbf3bb71 [libc++] Add .verify.cpp tests to the new format
With this patch, .verify.cpp tests explicitly require clang-verify, but
no other test types require clang-verify out of the box. This will allow
making several .fail.cpp tests that don't have any clang-verify markup
to be just .compile.fail.cpp tests, which in turn should allow removing
a long standing workaround that requires parsing tests to detect whether
they have any clang-verify markup in them.
2020-04-14 14:49:51 -04:00
Louis Dionne d58107c3bf [libc++] Remove support for .fail.mm tests
There are no such tests in the libc++ test suite, and I want to move
away from `.fail.cpp` tests (in favour of something else) too, which
require a workaround.
2020-04-14 12:20:23 -04:00
Louis Dionne 80aea8e4a8 [libc++] Simplify how with_system_cxx_lib and availability features are defined
Instead of spamming a bunch of available features that are not actually
used anywhere, only set those that are actually used in the test suite.
In the future, this should probably be based on the target triple only,
with the ability to have wildcards in the triple.
2020-04-14 08:28:05 -04:00
Louis Dionne 025641342b [libc++] NFC: Minor cleanups in config.py
Remove mentions of the ValgrindExecutor, which doesn't exist. That
executor is literally nowhere in the code base, so this is dead code
as far as we're concerned.

Also, inline a one-liner function that was called exactly once.
2020-04-14 08:28:05 -04:00
Louis Dionne 9d8c22587b [libc++] NFC: Remove unused Lit features in the test suite
The libc++ test suite currently defines several features that are not
used anywhere in the tests, or that are redundant with other features.
For the purpose of simplifying config.py and to ease the bring up of a
new configuration, this commit removes some of these features:

- rename dylib-has-no-filesystem to c++filesystem-disabled, which exists
- rename apple-darwin to just darwin, which is already set
- remove useless setting of libstdc++, which is already set correctly
- remove libcpp-abi-unstable, which is not used anywhere
- remove the glibc-XXX features, which are not used anywhere
2020-04-13 17:19:00 -04:00
Louis Dionne 4537ba4978 [libc++] NFC: Remove unused method call 2020-04-13 16:59:54 -04:00
Louis Dionne 77b46fb326 [libc++/abi] Add scripts for building libc++ and libc++abi on Apple platforms
These scripts allow creating dylibs that are very close to the dylibs
shipped on Apple platforms.
2020-04-09 12:58:54 -04:00
Eric Fiselier bf90b8fc25 [libc++] Fix failing concepts tests 2020-04-08 18:25:07 -04:00
Louis Dionne eceae25f6d [libc++] CI: Always build for both i386 and x86_64 in the back-deployment script 2020-04-08 16:11:20 -04:00
Louis Dionne a092e3833b [libc++] Remove the %{not} substitution
It has never been used, and it actually doesn't really work because it
assumes that the target supports Python. Instead, it's better to just
use `!` since we're running ShTests in system shells anyway.
2020-04-07 17:12:37 -04:00
Louis Dionne 3fefda6e57 [libc++] Run tests in a directory related to %t instead of /tmp
Instead of creating a temporary directory inside /tmp and running the
tests there, use a directory name based on LIT's %t substitution. This
has the benefit of not hitting /tmp so much (which is slow on some
filesystems). It also has the benefit that `ninja -C build clean` will
automatically remove the artifacts even if a test somehow failed to
remove its temporary directory (I've seen this happen when CTRL-C is
received).
2020-04-07 16:09:52 -04:00
Louis Dionne f8b6529218 [libc++] Translate MODULES_DEFINES annotations to ADDITIONAL_COMPILE_FLAGS
This allows both the old and the new testing formats to handle these
tests with modules enabled.

We also include the modules flags in the %{flags} substitution, which
means that .sh.cpp tests in the old format and all tests in the new
format will use modules flags when enabled.
2020-04-07 14:40:49 -04:00
Louis Dionne f75ebe1ab3 [libc++] Support .sh.s tests in the new format
libc++abi has two of these tests.
2020-04-07 09:13:21 -04:00
Louis Dionne 8a42bf24ae [lit] Move the recursiveExpansionLimit setting to TestingConfig
The LitConfig is shared across the whole test suite. However, since
enabling recursive expansion can be a breaking change for some test
suites, it's important to confine the setting to test suites that
enable it explicitly.

Note that other issues were raised with the way recursiveExpansionLimit
operates. However, this commit simply moves the setting to the right
place -- the mechanism by which it works can be improved independently.

Differential Revision: https://reviews.llvm.org/D77415
2020-04-06 13:58:00 -04:00
Louis Dionne 267273563d [libc++] Make sure we execute tests with the current environment
The new libc++ test format doesn't automatically do this (cause it
would be the wrong place to do it).
2020-04-06 13:38:11 -04:00
Louis Dionne 2c1c4777a5 [libc++] Always use -fsyntax-only in .fail.cpp tests
We had a workaround because GCC 5 does not evaluate static assertions
that are dependent on template parameters. This commit removes the
workaround and marks the corresponding tests as unsupported with GCC 5.
This has the benefit of bringing the new and the old test formats closer
without having to carry a workaround for an old compiler in the new
test format.
2020-04-06 11:38:45 -04:00
Louis Dionne 4e52944ef1 [libc++] Make sure we include %{flags} when building with the new format
Otherwise, we're missing some flags like the flags that are used by
sanitizer builds and the 32-bit builds. In the long term, I think it
would be better to have only %{compile_flags} and %{link_flags}, but
for the benefit of adopting the new format by default, I think it's OK
to add %{flags} to it.
2020-04-06 11:24:04 -04:00
Louis Dionne b00a874b7c [libc++] SSH: Fix tarring of dependencies on Windows
On Windows, we must make sure to close the temporary tar file before we
try to scp it.

This is an alternative approach to https://reviews.llvm.org/D77500.
2020-04-06 09:58:08 -04:00
Louis Dionne ceb58ad61d [libc++] Lit: Add default values for most arguments of test executors 2020-04-03 17:52:41 -04:00
Louis Dionne 80a2ddf65c [libc++] Add an alternative Lit test format
This new test format is simpler and more flexible. It creates Lit ShTests
on the fly that reuse existing substitutions (like %{cxx}) instead of
having complex logic in Python to run the tests. This has the benefit
that virtually no coding is required to customize how the test suite is
run -- one can achieve pretty much anything by defining the appropriate
substitutions in a simple lit.cfg file.

For example, in order to run the tests on an embedded device after
building with a specific SDK, one can set the %{cxx} and %{compile_flags}
substitutions to use that SDK, and the %{exec} substitution to the ssh.py
script currently used for .sh.cpp tests with a remote executor. Dealing with
the SSHExecutor becomes unnecessary, since all tests are treated like ShTests.

As a side effect of this design, configuration files for the test
suite can be as simple as:

	config.substitutions.append(('%{cxx}', '<path-to-compiler>'))
	config.substitutions.append(('%{compile_flags}', '<flags>'))
	config.substitutions.append(('%{link_flags}', '<flags>'))
	config.substitutions.append(('%{exec}', '<script-to-execute>'))

This should allow storing lit.cfg files for various configurations
directly in the repository instead of relying on complicated logic
in config.py to set up the right flags. I've found numerous problems
in that logic in the past years, and it seems like having simple and
explicit configuration files for the configurations we support is
going to solve most of these problems. Specifically, I am hoping to
store configuration files for testing other Standard Libraries in
the repository.

Improving the interaction with the test suite configuration is still a
work in progress, so for now this test format reuses the substitutions and
available features that are set up by the current config.py.

This new test format should support pretty much everything that the current
test format supports, however it will not be enabled by default at first to
make sure we're satisfied with it. For a short period of time, the new format
will require `--param=use_new_format=True` to be enabled, however it is a very
short term goal to replace the current testing format entirely and to simplify
the configuration accordingly.

Differential Revision: https://reviews.llvm.org/D77338
2020-04-03 11:35:27 -04:00
Louis Dionne 937040d181 [libc++] Add REQUIRES for tests that need -fblocks and -fobjc-arc
AppleClang seems to support these extensions by default, but other
compilers don't.
2020-04-03 10:10:35 -04:00
Louis Dionne ff09135fc2 [libc++] Execute tests from the Lit execution root instead of the test tree
Instead of executing tests from within the libc++ test suite, we execute
them from the Lit execution directory. However, since some tests have
file dependencies, we must copy those dependencies to the execution
directory where they are executed.

This has the major benefit that if a test modifies a file (whether it
is wanted or not), other tests will not see those modifications. This
is good because current tests assume that input data is never modified,
however this could be an incorrect assumption if some test does not
behave properly.
2020-04-01 22:17:03 -04:00
Louis Dionne 92e563bc05 [libc++] SSH: Create a tarball of dependencies and scp that instead
The benefit of doing this is that we can now handle directories that
contain symlinks and other arbitrary things, such as the static_test_env
required by filesystem tests.

As a fly-by fix, we also accumulate several commands to perform over SSH
and execute them at once instead of SSHing several times. This should be
faster on average.
2020-04-01 16:38:21 -04:00
Louis Dionne 160b01c9ef [libc++] SSH: Use -p when scp'ing to preserve modes and modification times 2020-04-01 12:32:23 -04:00
Louis Dionne 0489d39ead [libc++] SSH: Properly handle test-executables that are not the first argument
If a ShTest has for example another command in front of the test
executable it wants to execute, ssh.py needs to properly translate
the path of that test executable to the executable on the remote host.
For example, running '%{exec} ! %t.exe', we can't assume that the
test-executable is the first argument after '%{exec}'.
2020-04-01 11:44:39 -04:00
Louis Dionne 64acef386e [libc++] Handle SSH errors more gracefully and make sure we clean up the tmp directory 2020-04-01 11:00:39 -04:00
Sergej Jaskiewicz fee0026fc7 [libc++abi] Fix remote execution of .sh.cpp tests
This aims to fix test failures on the following buildbots:

- http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l
- http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64

Differential Revision: https://reviews.llvm.org/D77190
2020-04-01 10:09:07 -04:00
Louis Dionne 1c0dd57cd3 [libc++] Use 'export' instead of 'env' to run remote commands
This allows running commands that use shell builtins remotely too, when
'env' would complain that it can't find the program.
2020-03-31 17:11:28 -04:00
Louis Dionne 07e462526d [libc++] Allow running .sh.cpp tests with SSHExecutors
This commit adds a script that can be used as an %{exec} substitution
such that .sh.cpp tests can now run on remote hosts when using the
SSHExecutor.
2020-03-31 15:50:42 -04:00
Louis Dionne 89fe36d08a [libc++] Make sure substitutions are expanded inside FILE_DEPENDENCIES 2020-03-31 13:57:17 -04:00
Louis Dionne 34756a1c70 [libc++] Execute tests using an external shell
This makes it closer to how one would run the tests by hand, and it is
also closer to how the SSHExecutor runs the tests remotely. It also
allows using shell builtins in .sh.cpp tests when using %{exec}.
2020-03-31 11:31:39 -04:00
Louis Dionne fb47ffc618 [libc++] Provide a method for adding compiler flags in lit.local.cfg files
That way, local lit configuration files don't have to worry about
deep-copying the compiler instance of the test format, which is
arguably an implementation detail.

We pass the config to this method even though it is not used by the
current test format because this allows replacing the current test
format by other test formats that would require the config to add
new compile flags.
2020-03-31 09:29:18 -04:00
Louis Dionne d3a729ab24 [libc++] Set filesystem test flags in a lit.local.cfg
This reduces the complexity of our already complex global lit configuration,
and also avoids cluttering the compilation commands for all tests with
things that are only relevant to the filesystem tests.

Differential Revision: https://reviews.llvm.org/D76785
2020-03-31 09:29:02 -04:00
Louis Dionne 05bc588abb [libc++] Do not rely on the environment to run filesystem tests
Previously, filesystem tests would require LIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT
to be present in the environment and to match the value provided when
compiling, as a macro. This has the problem that it only allows for the
filesystem tests to be run on the same machine they are created.

Instead, we create a temporary directory for each test. Technically,
this is tricky to do because we're relying on some of the code that
we're testing to do this. However, there's no other portable way of
creating temporary direcories in C++, so this is difficult to avoid.

Differential Revision: https://reviews.llvm.org/D76731
2020-03-31 09:03:17 -04:00
Louis Dionne 05b04c685c Recommit "[libc++] NFC: Simplify substitutions by using lit recursive substitutions"
This re-commits cd7f9751c3, which was reverted in 12f6b024f9 because
it broke the LLVM `check-all` target. This commit addresses the underlying
issue by not setting the lit_config.recursiveExpansionLimit parameter of
the libc++ test suite, which is otherwise picked up by other test suites
in LLVM.

Once we've settled on a fix for the underlying issue with
lit_config.recursiveExpansionLimit, we can start using it
again in libc++, but for now we can just work around it.
2020-03-30 18:09:42 -04:00
Louis Dionne 32c9efb423 [libc++] Add support for a new keyword ADDITIONAL_COMPILE_FLAGS
This allows adding compilation flags for a single test, which can help
eliminate some .sh.cpp tests and some custom handling in the libc++
test format.

It also works around the issue that .sh.cpp substitutions are _not_
equivalent to the actual compiler command lines used to compile tests,
since the compiler flags can be modified in local lit configurations,
and substitutions are frozen at that point. For example using %{compile}
in a .sh.cpp test in the coroutines subdirectory will not include the
-fcoroutines-ts flag, which is added in the local lit config, because
the %{compile} substitution is created long before we add -fcoroutines-ts
to the compiler flags (in the lit.local.cfg for coroutines).
2020-03-30 12:40:48 -04:00
David Zarzycki 12f6b024f9
Revert "[libc++] NFC: Simplify substitutions by using lit recursive substitutions"
This reverts commit cd7f9751c3 which has
unintended breakage to non-libcxx projects when using the documented way
of building LLVM. (See the Getting Started guide. I.e. one big CMake setup.)
2020-03-29 21:08:42 -04:00
Louis Dionne e9a2caf34c [libc++] Use braces around %file_dependencies substitution
This one was left out from a previous commit.
2020-03-27 11:33:25 -04:00
Louis Dionne cd7f9751c3 [libc++] NFC: Simplify substitutions by using lit recursive substitutions
Since lit supports expanding substitutions recursively, we can define
substitutions in terms of other substitutions. This allows us to simplify
how libc++ substitutions are defined.

This doesn't change the substitutions at all, it only makes them simpler
to define.
2020-03-27 11:09:08 -04:00
Louis Dionne 08776defa5 [libc++/libc++abi] Properly delimit lit substitutions
lit is not very clever when it performs substitution on RUN lines. It
simply looks for a match anywhere in the line (without tokenization)
and replaces it by the expansion. This means that a RUN line containing
e.g. `-verify-ignore-unexpected=note` wouod be expanded to
`-verify-ignore-unexpected=<substitution for not>e`, which is
surprising and nonsensical.

It also means that something like `%compile_module` could be expanded
to `<substitution-for-%compile>_module` or to the correct substitution,
depending on the order in which substitutions are evaluated by lit.

To avoid such problems, it is a good habit to delimit custom substitutions
with some token. This commit does that for all substitutions used in the
libc++ and libc++abi test suites.
2020-03-27 10:27:38 -04:00
Louis Dionne 3f2f7f895a [libc++] Remove unused lit substitutions 2020-03-27 10:08:57 -04:00
Sterling Augustine 6c6fba8808 Correctly handle using foo = std::foo inside namespaces.
Summary:
The gdb pretty printer misprints variables declared via
using declarations of the form:

namespace foo {
using string_view = std::string_view;

string_view bar;
}

This change fixes that, by deferring the decision to ignore
types not inside std until after desugaring.

Reviewers: #libc!

Subscribers: broadwaylamb, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D76816
2020-03-26 11:20:09 -07:00
Eric Fiselier 076773253e Revert "[libc++] Run the builders Docker containers 'as 'buildbot instead of 'root'"
This reverts commit a32b94c6c3.

The buildbot startup scripts need to run as root. The buildbot
worker should have already been running as a different account.
More investigation needed.
2020-03-26 08:08:01 -04:00
Louis Dionne a5fa5f7cb8 [libc++] Do not force the use of -Werror in verify tests
Forcing -Werror and other warnings means that the test suite isn't
actually testing what most people are seeing in their code -- it seems
better and less arbitrary to compile these tests as close as possible
to the compiler default instead.

Removing -Werror also means that we get to differentiate between
diagnostics that are errors and those that are warnings, which makes
the test suite more precise.

Differential Revision: https://reviews.llvm.org/D76311
2020-03-26 07:54:45 -04:00
Louis Dionne aec82f9256 [libc++] Require the use of clang-verify in .fail.cpp tests that don't fail without it
Some tests do not fail at all when -verify is not supported, unless some
arbitrary warning flag is added to make them fail. We currently used
-Werror=unused-result to make them fail, but doing so makes the test
suite a lot more inscrutable. It seems better to just disable those
tests when -verify is not supported.

Differential Revision: https://reviews.llvm.org/D76256
2020-03-25 16:48:09 -04:00
Louis Dionne 9223b7f927 [libc++] Add a new %exec substitution
It allows executing arbitrary commands with the same environment as
normal .pass.cpp tests, which is handy.
2020-03-25 16:26:57 -04:00
Louis Dionne f03ac38147 [libc++] Drop custom support for flaky tests from libc++ test suite
Instead, use the builtin support in lit. This makes the libc++ custom
test format slightly closer to the builtin ShTest format in behavior.
2020-03-25 14:41:53 -04:00
Louis Dionne a32b94c6c3 [libc++] Run the builders Docker containers 'as 'buildbot instead of 'root' 2020-03-25 12:07:44 -04:00
Louis Dionne 7311b27403 [libc++] Install a recent CMake in the Docker build bots 2020-03-24 18:06:56 -04:00
Louis Dionne 3c84aca9b3 [libc++] Bump Clang support for Clang 4
It's hard to imagine someone using a recent version of libc++ with a
roughly 3 years old Clang. Since we're not testing libc++ with Clang 3.5
anyway, claiming support for it is somewhat of a lie.

Note that we don't test Clang 4 either, however I have no reason to bump
the requirement beyond Clang 4 at the moment, whereas removing Clang 3.5
allows simplifying the test suite.

Differential Revision: https://reviews.llvm.org/D76618
2020-03-23 12:17:04 -04:00
Eric Fiselier c0e1135fb0 [libc++] Fix URL to llvm github 2020-03-21 10:13:50 -04:00
Eric Fiselier deb5103378 [libc++] Rework buildbot configuration for the greater good.
This commit rewrites/removes the docker files used to create
the libc++ buildbots.

The major changes in this patch are:

1. Delete Dockerfiles used to build compilers. These have moved to
   github.com/efcs/compiler-images

2. Minimize the llvm-buildbot docker image. Instead of running the
buildbots from a committed docker image, the builders now build the
image on startup. This means changes to the docker file automatically
propogate to the builders (within ~24 hours without restart).

3. Version the compilers used by the builders. This means the bots
won't start failing because the apt.llvm.org clang package updated.
2020-03-21 10:02:40 -04:00
Louis Dionne 0feaf22c8a [libc++] Properly handle environment variables with '=' in them 2020-03-20 19:29:01 -04:00
Louis Dionne e22fe98d05 [libc++] Make the %run substitution closer to how .pass.cpp tests are executed
Before this patch, the %run substitution did not contain the same
environment variables as normal `pass.cpp` tests. It also didn't
have the right working directory and the script wasn't aware of
potential file dependencies.

With this change, the combination of %build and %run in a .sh.cpp script
should match how pass.cpp tests are actually executed much more closely.
2020-03-20 18:52:14 -04:00
Louis Dionne 7efbd851ad [libc++] Add a new FILE_DEPENDENCIES parser
Instead of considering all the .dat files to be dependencies of a test,
only consider those that are listed in FILE_DEPENDENCIES.
2020-03-20 14:55:52 -04:00
Louis Dionne a4ef2a71d3 [libc++] Move some misplaced compile-time flags
Some compilation-only flags were in %flags, but they should have been
in %compile_flags only.
2020-03-17 17:53:20 -04:00
Louis Dionne 3d9e6c42f8 [libc++] Use env to set the tool's environment on Darwin 2020-03-17 15:40:51 -04:00
Marek Kurdej 05343588e3 [libc++] [P0646] Add feature-test macro for __cpp_lib_list_remove_return_type.
Summary: The return type modification has already been implemented in rL364840 and rL365290.

Reviewers: ldionne, mclow.lists, EricWF, #libc!

Reviewed By: ldionne

Subscribers: christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D70275
2020-03-12 11:06:49 +01:00
Petr Hosek dffbaa4014 [libcxx] Drop -D option from libtool when merging archives
This is a follow up to D74108. This option is not supported by older
versions of libtool so remove it. We keep the -s option to build the
index.
2020-03-02 16:07:18 -08:00
Petr Hosek 603acd9626 [libcxx] When merging archives, build index even on Darwin
We always want to build the table of contents. Additionally, we also
set the flag to make the output deterministic which is already the
default for llvm-ar.

Differential Revision: https://reviews.llvm.org/D74108
2020-03-02 11:02:42 -08:00
Eric Fiselier b4b4259a49 [libc++] update GCC cherry-pick to build 4.8.5 2020-02-28 13:36:35 -05:00
Eric Fiselier 0b8585ede4 [libc++] Update compiler images and more docker cleanup. 2020-02-27 17:22:58 -05:00
Eric Fiselier fdba2e4ed1 [libc++] Update lld version on buildbots to be LLVM-11. 2020-02-27 16:28:04 -05:00
Eric Fiselier 1d8fad44d3 [libc++] Rework docker files for buildbots.
I've been sitting on this change for a while and have been using
it to build the bot images, so it should be upstream.

This re-configures the docker build files to use docker-compose
more heavily. This allows for composing large images with multiple
compilers without invalidating the docker caches.

After this commit I'll quickly switch all the current buildbots
over to a new docker image, followed by another update to add new
compilers
2020-02-27 15:32:48 -05:00
Louis Dionne 12339efd70 Revert "[libc++] Do not set the `availability=XXX` feature when not testing against a system libc++"
This reverts commit 7dd6a862e, which broke more tests than it fixed.
2020-02-26 19:20:14 -05:00
Louis Dionne 7dd6a862e5 [libc++] Do not set the `availability=XXX` feature when not testing against a system libc++
Otherwise, the `availability=XXX` lit feature is set even when we're
testing trunk and _LIBCPP_DISABLE_AVAILABILITY is defined, which causes
tests that check for availability markup to be enabled and unexpectedly
pass.
2020-02-21 14:21:16 -05:00
Eric Fiselier 99382e450f [libc++] Add utility to generate and display libc++'s header dependency
graph.
2020-02-15 18:47:17 -05:00
Louis Dionne 2234cf5114 [libc++][macOS CI] Ensure that the SDK version is not older than the deployment target 2020-02-11 13:52:41 +01:00
Marek Kurdej e93e58c6c4 Reland [libc++] [P0325] Implement to_array from LFTS with updates.
Fixed expected errors and notes.

Summary:
This patch implements https://wg21.link/P0325.

Reviewers: EricWF, mclow.lists, ldionne, lichray

Reviewed By: ldionne, lichray

Subscribers: lichray, dexonsmith, zoecarver, christof, ldionne, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D69882
2020-01-31 11:47:18 +01:00
Marek Kurdej 5e7017273f Revert "[libc++] [P0325] Implement to_array from LFTS with updates."
This reverts commit 86aae78268.

A test is failing on "Release" build without assertions enabled (Fedora 31 on x86_64).
2020-01-31 09:45:50 +01:00
Marek Kurdej 86aae78268 [libc++] [P0325] Implement to_array from LFTS with updates.
Summary:
This patch implements https://wg21.link/P0325.
Please mind that at it is my first contribution to libc++, so I may have forgotten to abide to some conventions.

Reviewers: EricWF, mclow.lists, ldionne, lichray

Reviewed By: ldionne, lichray

Subscribers: lichray, dexonsmith, zoecarver, christof, ldionne, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D69882
2020-01-30 13:38:37 +01:00
Eric Fiselier b4c911eccc [libcxx] Add a std::string_view pretty printer for libcxx.
This adds a std::string_view pretty printer for libcxx and updates the gdb
pretty printer test.

Patch by Ali Tamur (tamur@google.com)
Reviewed as https://reviews.llvm.org/D73514
2020-01-29 13:04:29 -05:00
Sergej Jaskiewicz 7b8dc8c576 [libcxx] Support Python 3.8 in the test suite
Summary: `platform.linux_distribution()` has been deprecated in Python 3.5 and removed in Python 3.8.

Reviewers: bcain, bcraig, jroelofs, EricWF, mclow.lists, ldionne

Reviewed By: jroelofs

Subscribers: dexonsmith, christof, ldionne, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D72501
2020-01-21 20:27:31 +03:00
Sergej Jaskiewicz 049c437c40 [libcxx] Introduce LinuxRemoteTI for remote testing
Summary:
This patch adds a new target info object called LinuxRemoteTI.
Unlike LinuxLocalTI, which asks the host system about various things
like available locales, distribution name etc. which don't make sense
if we're testing on a remote board, LinuxRemoteTI uses SSHExecutor
to get information from the target system.

Reviewers: jroelofs, ldionne, bcraig, EricWF, danalbert, mclow.lists

Reviewed By: jroelofs

Subscribers: christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D72847
2020-01-18 01:27:30 +03:00
Sergej Jaskiewicz e308a0ca15 [libcxx] Fix a typo in config.py
Reviewers: ldionne, jroelofs, EricWF

Subscribers: christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D71890
2019-12-26 18:51:09 +03:00
Eric Fiselier f97936fabd [libc++] Cleanup and enable multiple warnings.
Too many warnings are being disabled too quickly. Warnings are
important to keeping libc++ correct. This patch re-enables two
warnings: -Wconstant-evaluated and -Wdeprecated-copy.

In future, all warnings disabled for the test suite should require
an attached bug. The bug should state the plan for re-enabling that
warning, or a strong case why it should remain disabled.
2019-12-12 21:09:08 -05:00
Sergej Jaskiewicz 44c167ace9 [libcxx] Replace func_name with __name__ for compatibility with Python 3
Summary:
The __name__ attribute is the correct way to get a function name in
Python 3. This also works with Python 2.

Reviewers: jroelofs, EricWF

Subscribers: christof, ldionne, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D71136
2019-12-11 02:37:13 +03:00
Louis Dionne 8bd9d0bff2 [libcxx] [test] Query the target platform, not the host one
target_info is inferred to WindowsLocalTI on Windows hosts unless
specified otherwise. In the latter case, it doesn't make sense to use
Windows-specific settings if the target is not Windows.

This change should not break anything, because target_info is inferred
based on what platform.system() returns. self.is_windows was set based
on the same platform.system() call.

Thanks to Sergej Jaskiewicz for the patch.

Differential Revision: https://reviews.llvm.org/D68275
2019-12-10 16:36:07 -05:00
David Zarzycki 06e5ebf8db
[libcxx] Add -Wno-deprecated-copy to the test config 2019-11-29 09:57:51 +02:00
Louis Dionne 8b77a3a0f4 [libc++] [P1612] Add missing feature-test macro __cpp_lib_endian.
Thanks to Marek Kurdej for the patch.

Differential Revision: https://reviews.llvm.org/D70221
2019-11-14 08:55:19 -05:00
Louis Dionne fd02a46855 [libcxx] Make generate_feature_test_macro_components script compatible with Python 3.
The script is still compatible with Python 2 as well.
Thanks to Marek Kurdej for the patch.

Differential Revision: https://reviews.llvm.org/D69884
2019-11-06 16:45:47 +00:00
Dávid Bolvanský dba8396572 [libcxx] Disable -Wconstant-evaluated for testsuite
Reviewers: EricWF

Subscribers: christof, ldionne, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D69708
2019-11-01 13:46:47 +01:00
Louis Dionne fd667b860e [libcxx] [test] Run `chmod +x` on executables when testing via SSH
When running libc++ tests on a remote machine via SSH, we can encounter
a 'Permission denied' error.

Fix this with plain old 'chmod +x <executable>'.

Thanks to Sergej Jaskiewicz for the patch.

Differential Revision: https://reviews.llvm.org/D69170
2019-10-25 09:47:46 -07:00
Casey Carter 689ce81059
[libc++][NFC] Remove excess trailing newlines from most files
Testing git commit access.
2019-10-23 08:08:57 -07:00
Louis Dionne 1ea8bb39b9 [libc++] Move the linker script generation step to CMake
Summary:
This allows the linker script generation to query CMake properties
(specifically the dependencies of libc++.so) instead of having to
carry these dependencies around manually in global variables. Notice
the removal of the LIBCXX_INTERFACE_LIBRARIES global variable.

Reviewers: phosek, EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits

Tags: #libc

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

llvm-svn: 374116
2019-10-08 21:10:20 +00:00
Fangrui Song 4a71328f15 Make libc++ gdb pretty printer Python 3 compatible
llvm-svn: 373691
2019-10-04 04:47:33 +00:00
Eric Fiselier 5e7e6f16d9 Attempt to remove linker workaround on the buildbots: Attempt 2
The first commit removed the workaround in a old script.
This patch removes it in the file actually used by the bots.

I have no idea if this is still needed, but removing the
workaround seems like the easiest way to test.

I'll revert this change if the bots go red.

llvm-svn: 373653
2019-10-03 19:38:44 +00:00
Eric Fiselier bed690e370 Attempt to remove linker workaround on the buildbots.
I have no idea if this is still needed, but removing the
workaround seems like the easiest way to test.

I'll revert this change if the bots go red.

llvm-svn: 373650
2019-10-03 19:13:35 +00:00
Sterling Augustine 9b36c1cf27 Determine endianness at a time when it doesn't inadvertantly clear gdb's wrap_buffer via gdb.execute.
Summary:
I haven't managed a small reproduction for this bug, it involves
complicated and deeply nested data structures with a wide variety
of pretty printers. But in general, we shouldn't be combining
gdb's command line interface (via gdb.execute) with pretty-printers.

Subscribers: christof, llvm-commits

Tags: #llvm

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

llvm-svn: 373402
2019-10-01 22:42:37 +00:00
Louis Dionne 340b725202 [libc++] Add a CMake cache for Apple-specific configuration options
llvm-svn: 371638
2019-09-11 16:57:19 +00:00
Sterling Augustine 3270941f1e Add gdb pretty printers for a wide variety of libc++ data structures (take 2).
Summary:
This patch is an exact duplicate of https://reviews.llvm.org/D65609, except
that it uses the newly introduced testing framework to detect if gdb is present
so that the tests won't fail on machines without gdb.

Reviewers: echristo, EricWF

Subscribers: christof, ldionne, llvm-commits

Tags: #llvm

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

llvm-svn: 371131
2019-09-05 21:35:05 +00:00
Sterling Augustine a127795617 Don't assume libcxx_gdb is always set.
libc++abi also uses this file, but doesn't use the same CMakeLists.txt.

llvm-svn: 371130
2019-09-05 21:34:54 +00:00
Vedant Kumar 1261f1b980 [libcxx] Codesign test executables if necessary
If LLVM_CODESIGNING_IDENTITY is set, test executables need to be
codesigned.

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

llvm-svn: 371126
2019-09-05 21:24:23 +00:00
Sterling Augustine bf7602b261 Add testing infrastructure to check if gdb is available for testing.
Reviewers: echristo, EricWF

Subscribers: mgorny, christof, llvm-commits

Tags: #llvm

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

llvm-svn: 371120
2019-09-05 20:44:08 +00:00
Sterling Augustine 33e17db591 Revert "Add gdb pretty printers for a wide variety of libc++ data structures."
This reverts commit d8c9f2f572fe06a34ccfc28ee9223b64d7d275d3.

llvm-svn: 370553
2019-08-31 00:00:34 +00:00
Sterling Augustine d21a3e41a4 Add gdb pretty printers for a wide variety of libc++ data structures.
Summary: Also add a test suite.

Reviewers: EricWF

Subscribers: christof, llvm-commits

Tags: #llvm

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

Run a pep8 formatter.

Run pep8 formatter.

Convert to PEP8, address other comments from code review.

llvm-svn: 370551
2019-08-30 23:43:34 +00:00
Louis Dionne 344eee9227 [libc++] Improve Python 3 compatibility for merge_archives.py
Popen.communicate() method in Python 2 returns a pair of strings, and in
Python 3 it returns a pair of byte-like objects unless universal_newlines
is set to True. This led to an error when using Python 3. With this patch,
merge_archives.py works fine with Python 3.

Thanks to Sergej Jaskiewicz for the patch.
Differential Revision: https://reviews.llvm.org/D66649

llvm-svn: 369764
2019-08-23 15:05:54 +00:00
Nico Weber 01d7fe7605 libcxx: Make gen_link_script.py print contents only in --dryrun mode
The build should generally be quiet if there are no errors,
and this script has been around long enough that we can remove
the log output. If we ever need to debug something with this script,
we can put back the logging then.

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

llvm-svn: 369757
2019-08-23 13:40:54 +00:00
Nico Weber cc89063bff libcxx: Rename .hpp files in libcxx/test/support to .h
LLVM uses .h as its extension for header files.

Files renamed using:

    for f in libcxx/test/support/*.hpp; do git mv $f ${f%.hpp}.h; done

References to the files updated using:

    for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do
        a=$(basename $f);
        echo $a;
        rg -l $a libcxx | xargs sed -i '' "s/$a/${a%.hpp}.h/";
    done

HPP include guards updated manually using:

    for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do
      echo ${f%.hpp}.h ;
    done | xargs mvim

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

llvm-svn: 369481
2019-08-21 00:14:12 +00:00
Eric Fiselier bc2f425377 fix buildbot start script to no longer hang
llvm-svn: 369428
2019-08-20 19:06:23 +00:00
Eric Fiselier 1d37ec1fda bump lld version used by buildbots
llvm-svn: 369416
2019-08-20 17:43:00 +00:00
Louis Dionne ab50b830d0 [libc++] Populate a lit feature including the compiler patch level
If the compiler is (for example) AppleClang 10.0.1, we would previously
populate the following lit features:

    apple-clang
    apple-clang-10
    apple-clang-10.0

This patch additionally populates a feature called 'apple-clang-10.0.1',
which allows more precise enabling/disabling of tests.

llvm-svn: 369406
2019-08-20 16:41:38 +00:00
Louis Dionne 5f92cb7014 [libc++] Fix environment variable passing in libc++'s `SSHExecutor` `lit` utility
Summary:
Quote the value of environment variables when passing them to the SSH
client in SSHExecutor in libc++'s lit utilities. Without the quotes,
an environment variable like FOO="buzz bar" gets passed incorrectly
like this, ssh env FOO=buzz bar, which causes bar to be treated as a
command to run, not part of the environment variable value.

We ran into this when using SSHExecutor to do bringup of our CUDA
libcu++ port on an embedded aarch64 system.

Patch by Bryce Adelstein Lelbach.

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

llvm-svn: 368317
2019-08-08 17:33:35 +00:00
Louis Dionne bf4808439f [pstl] Add a __pstl_config_site header to record the CMake configuration
This commit adds a __pstl_config_site header that contains the value of
macros specified at CMake configuration time. It works similarly to
libc++'s __config_site header, except we always include it as a separate
file instead of concatenating it to the main configuration header.

It is necessary to thread the includes for that header into libc++'s
lit configuration, otherwise we'd be requiring an installation step
prior to running the test suite.

llvm-svn: 368284
2019-08-08 12:43:04 +00:00
Louis Dionne 53e9c2d76b [libc++] Use the monorepo for the back-deployment testing scripts
llvm-svn: 368077
2019-08-06 20:01:28 +00:00
Louis Dionne 8442252c49 [libc++] Use the monorepo in the macos-trunk CI script
llvm-svn: 368051
2019-08-06 15:28:34 +00:00
Louis Dionne d131713307 [libc++] Accept any non-zero return for .fail.cpp tests
llvm-svn: 367930
2019-08-05 21:26:50 +00:00
Louis Dionne 0a06eb911b [libc++] Take 2: Integrate the PSTL into libc++
Summary:
This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when
configuring libc++ in CMake. When that option is enabled, libc++ will
assume that the PSTL can be found somewhere on the CMake module path,
and it will provide the C++17 parallel algorithms based on the PSTL
(that is assumed to be available).

The commit also adds support for running the PSTL tests as part of
the libc++ test suite.

The first attempt to commit this failed because it exposed a bug in the
tests for modules. Now that this has been fixed, it should be safe to
commit this.

Reviewers: EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF

Tags: #libc

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

llvm-svn: 367903
2019-08-05 18:29:14 +00:00
Eric Fiselier 278d593014 Revert "Suppress -Wctad-maybe-unsupported on types w/o deduction guides."
Some modules builds are issuing buggy diagnostics. The cause of which is
TBD.

This reverts commit r@367770.

llvm-svn: 367777
2019-08-04 07:13:43 +00:00
Eric Fiselier fcd549a7d8 Suppress -Wctad-maybe-unsupported on types w/o deduction guides.
There are a handful of standard library types that are intended
to support CTAD but don't need any explicit deduction guides to
do so.

This patch adds a dummy deduction guide to those types to suppress
-Wctad-maybe-unsupported (which gets emitted in user code).

llvm-svn: 367770
2019-08-03 23:54:29 +00:00
Roman Lebedev 1e4a094b37 [benchmark] Fix win32 link on case-sensitive fs
Summary: This fixes cross-builds with MinGW from case-sensitive file-systems (on Linux)

This is a cherry-pick from
https://github.com/google/benchmark/pull/840
8e48105d46

Original patch by: @jschueller (Julien Schueller) !

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

llvm-svn: 367356
2019-07-30 20:47:59 +00:00
Eric Fiselier 54bb5413e6 add more information to benchmark test failures
llvm-svn: 367319
2019-07-30 15:11:41 +00:00
Eric Fiselier 0c045f135d Ensure __config_site definitions are passed to modules tests.
The test configuration contained a bug where we only raised
the __config_site commands to the command line if modules were
enabled for all of the libc++ tests. However there are special
modules-only tests, and these tests weren't getting the correct
defines.

This patch corrects that issue.

llvm-svn: 367267
2019-07-29 22:48:34 +00:00
David Tenty b9179ff857 [AIX][lit] Don't depend on psutil on AIX
Summary:
On AIX psutil can run into problems with permissions to read the process
tree, which causes problems for python timeout tests which need to kill off
a test and it's children.

This patch adds a workaround by invoking shell via subprocess and using a
platform specific option to ps to list all the descendant processes so we can
kill them. We add some checks so lit can tell whether timeout tests are
supported with out exposing whether we are utilizing the psutil
implementation or the alternative.

Reviewers: hubert.reinterpretcast, andusy, davide, delcypher

Reviewed By: delcypher

Subscribers: davide, delcypher, christof, lldb-commits, libcxx-commits, llvm-commits

Tags: #lldb, #libc, #llvm

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

llvm-svn: 366912
2019-07-24 15:04:27 +00:00
Roger Ferrer Ibanez 09e6304440 [RISCV] Implement benchmark::cycleclock::Now
This is a cherrypick of D64237 onto llvm/utils/benchmark and
libcxx/utils/google-benchmark.

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

llvm-svn: 366868
2019-07-24 05:33:46 +00:00
Louis Dionne c3e452acde [libc++] Do not infer support for C++17 in GCC < 7
libc++'s lit configuration infers the C++ language dialect when it is
not provided by checking which -std= flags that a compiler supports.
GCC 5 and GCC 6 have a -std=c++17 flag, however, they do not have full
C++17 support. The lit configuration has hardcoded logic that removes
-std=c++1z as an option to test for GCC < 7, but not -std=c++17.

This leads to a bunch of failures when running libc++ tests with GCC 5
or GCC 6. This patch adds -std=c++17 to the list of flags that are
discarded for GCC < 7 by lit's language dialect inference.

Thanks to Bryce Adelstein Lelbach for the patch.

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

llvm-svn: 366700
2019-07-22 16:24:48 +00:00
Louis Dionne a3c83b7511 Revert "[libc++] Integrate the PSTL into libc++"
This reverts r366593, which caused unforeseen breakage on the build bots.
I'm reverting until the problems have been figured out and fixed.

llvm-svn: 366603
2019-07-19 18:52:46 +00:00
Louis Dionne 3b1ef58128 [libc++] Allow passing additional CMake arguments in macOS trunk CI script
llvm-svn: 366601
2019-07-19 18:47:00 +00:00
Louis Dionne 910323e667 [libc++] Integrate the PSTL into libc++
Summary:
This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when
configuring libc++ in CMake. When that option is enabled, libc++ will
assume that the PSTL can be found somewhere on the CMake module path,
and it will provide the C++17 parallel algorithms based on the PSTL
(that is assumed to be available).

The commit also adds support for running the PSTL tests as part of
the libc++ test suite.

Reviewers: rodgert, EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF

Tags: #libc

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

llvm-svn: 366593
2019-07-19 17:02:42 +00:00
Eric Fiselier a780216fb3 Tolerate import errors in "not.py" implementation
llvm-svn: 365855
2019-07-12 01:13:05 +00:00
Louis Dionne 1c478d6e85 [libc++] Update availability markup for Filesystem on Apple platforms
llvm-svn: 365068
2019-07-03 18:29:02 +00:00
Michal Gorny a5bb7b6c20 [libcxx] [test] Read files as bytestrings to fix py3 encoding issues
Use binary mode to read test files in libcxx LibcxxTestFormat class.
This ensures that tests are read correctly independently of encoding,
and therefore fixes UnicodeDecodeError when file is opened in Python 3
that defaults to pure ASCII encoding.

Technically this could be also fixed via conditionally appending
encoding argument when opening the file in Python 3.  However, since
the code in question only searches for fixed ASCII substrings reading
it in binary mode is simpler and more universal.

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

llvm-svn: 364170
2019-06-24 09:40:33 +00:00
Eric Fiselier a8aa58fb3d Reconfigure docker builders to be more modular.
And other various cleanups to the configuration.

llvm-svn: 363722
2019-06-18 19:31:38 +00:00
Eric Fiselier 2ade4f6f72 attempt to unbreak buildbots
llvm-svn: 363442
2019-06-14 19:31:17 +00:00
Petr Hosek 737de4d363 [libcxx] Use libtool when merging archives on Apple platforms
ar doesn't produce the correct results when used for linking static
archives on Apple platforms, so instead use libtool -static which is
the official way to build static archives on those platforms.

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

llvm-svn: 362311
2019-06-02 01:14:31 +00:00
Eric Fiselier ae02e89448 P0722R3: Implement library support for destroying delete
Summary:
This provides the `std::destroying_delete_t` declaration in C++2a and after. (Even when the compiler doesn't support the language feature).

However, the feature test macro `__cpp_lib_destroying_delete` is only defined when we have both language support and  C++2a.


Reviewers: ldionne, ckennelly, serge-sans-paille, EricWF

Reviewed By: EricWF

Subscribers: dexonsmith, riccibruno, christof, jwakely, jdoerfert, mclow.lists, ldionne, libcxx-commits

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

llvm-svn: 361572
2019-05-23 23:46:44 +00:00
Eric Fiselier a1f420de8c Fix permission error while running bots
llvm-svn: 359405
2019-04-28 17:00:46 +00:00