Commit Graph

226 Commits

Author SHA1 Message Date
Thomas A
a574ade231 Downgrading libcxx to llvmorg-13.0.1
It turns out that llvmorg-14.0.6 might be too new for dyld (the vector base class no longer exist in that release).
2022-06-26 13:05:32 -07:00
Thomas A
e3bbeb7fdc Update libcxx source to llvmorg-14.0.6 2022-06-26 09:13:52 -07:00
Louis Dionne
ef2d23967e [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@374116 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-08 21:10:20 +00:00
Fangrui Song
2b539adf22 Make libc++ gdb pretty printer Python 3 compatible
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@373691 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-04 04:47:33 +00:00
Eric Fiselier
0d7477f78f 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@373653 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-03 19:38:44 +00:00
Eric Fiselier
9dce2def7e 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@373650 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-03 19:13:35 +00:00
Sterling Augustine
2518823f1d 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@373402 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-01 22:42:37 +00:00
Louis Dionne
2c8cda3ad5 [libc++] Add a CMake cache for Apple-specific configuration options
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@371638 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-11 16:57:19 +00:00
Sterling Augustine
a0b20c4c30 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@371131 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-05 21:35:05 +00:00
Sterling Augustine
e6c507c0e1 Don't assume libcxx_gdb is always set.
libc++abi also uses this file, but doesn't use the same CMakeLists.txt.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@371130 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-05 21:34:54 +00:00
Vedant Kumar
8b2db26471 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@371126 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-05 21:24:23 +00:00
Sterling Augustine
39bc9e010c 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@371120 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-05 20:44:08 +00:00
Sterling Augustine
1cdafefbbc Revert "Add gdb pretty printers for a wide variety of libc++ data structures."
This reverts commit d8c9f2f572fe06a34ccfc28ee9223b64d7d275d3.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@370553 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-31 00:00:34 +00:00
Sterling Augustine
025042504e 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@370551 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 23:43:34 +00:00
Louis Dionne
ba34f51708 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369764 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 15:05:54 +00:00
Nico Weber
90c8cee2d0 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369757 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 13:40:54 +00:00
Nico Weber
28db4445e2 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369481 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 00:14:12 +00:00
Eric Fiselier
61563aa43f fix buildbot start script to no longer hang
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369428 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 19:06:23 +00:00
Eric Fiselier
3b71d7ba1f bump lld version used by buildbots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369416 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 17:43:00 +00:00
Louis Dionne
969fd81491 [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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369406 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 16:41:38 +00:00
Louis Dionne
60739846ba [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@368317 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-08 17:33:35 +00:00
Louis Dionne
1ec0feb111 [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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@368284 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-08 12:43:04 +00:00
Louis Dionne
2858f4dd65 [libc++] Use the monorepo for the back-deployment testing scripts
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@368077 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-06 20:01:28 +00:00
Louis Dionne
f233fe0b2f [libc++] Use the monorepo in the macos-trunk CI script
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@368051 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-06 15:28:34 +00:00
Louis Dionne
69b3c29338 [libc++] Accept any non-zero return for .fail.cpp tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367930 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 21:26:50 +00:00
Louis Dionne
56c0bbff3a [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367903 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 18:29:14 +00:00
Eric Fiselier
8279a1399e 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367777 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-04 07:13:43 +00:00
Eric Fiselier
de267ad1f1 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).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367770 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-03 23:54:29 +00:00
Roman Lebedev
c45ad92a35 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367356 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 20:47:59 +00:00
Eric Fiselier
392947ba1b add more information to benchmark test failures
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367319 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 15:11:41 +00:00
Eric Fiselier
20ea9e39b8 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367267 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-29 22:48:34 +00:00
David Tenty
f8c785b6cb [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366912 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-24 15:04:27 +00:00
Roger Ferrer Ibanez
6bdf0af168 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366868 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-24 05:33:46 +00:00
Louis Dionne
16e87a2f3e [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366700 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-22 16:24:48 +00:00
Louis Dionne
33f76384d0 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366603 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 18:52:46 +00:00
Louis Dionne
55d3b34d44 [libc++] Allow passing additional CMake arguments in macOS trunk CI script
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366601 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 18:47:00 +00:00
Louis Dionne
106db235ed [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366593 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 17:02:42 +00:00
Eric Fiselier
e98aed4733 Tolerate import errors in "not.py" implementation
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365855 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 01:13:05 +00:00
Louis Dionne
ba4d4df3ab [libc++] Update availability markup for Filesystem on Apple platforms
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365068 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-03 18:29:02 +00:00
Michal Gorny
6f546837a4 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@364170 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 09:40:33 +00:00
Eric Fiselier
7d9183ba3a Reconfigure docker builders to be more modular.
And other various cleanups to the configuration.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@363722 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-18 19:31:38 +00:00
Eric Fiselier
2a9550e537 attempt to unbreak buildbots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@363442 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-14 19:31:17 +00:00
Petr Hosek
d7d781f191 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@362311 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-02 01:14:31 +00:00
Eric Fiselier
087c094fec 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@361572 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-23 23:46:44 +00:00
Eric Fiselier
30f78b946a Fix permission error while running bots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359405 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-28 17:00:46 +00:00
Eric Fiselier
57c2f5da67 attempt to unbreak build bots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359404 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-28 16:42:49 +00:00
Eric Fiselier
2cdb5e3dd7 Attempt to switch to auto-scaling bots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359403 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-28 15:54:50 +00:00
Marshall Clow
321a1f890d Implement midpoint for floating point types. Reviewed as https://reviews.llvm.org/D61014.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359184 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-25 12:11:43 +00:00
Eric Fiselier
250205c9d2 Add std::is_constant_evaluated.
Clang recently added __builtin_is_constant_evaluated() and GCC 9.0
has it as well.

This patch adds support for it in libc++.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359119 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-24 17:54:25 +00:00
Petr Hosek
82c110a209 [libcxx] Use relative path for libc++ library when generating script
This addresses the issue introduced in D60309 which leads to linker
scripts being generated with absolute paths.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359045 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-23 22:55:28 +00:00