Commit Graph

176 Commits

Author SHA1 Message Date
Eric Fiselier
58cb7c19bf Suppress -Waligned-allocation-unavailable warning in libc++ test suite
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307218 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 22:40:58 +00:00
David L. Jones
4438e211a7 [lit/libcxx] Fix a remaining reference to lit.util.capture() in custom libcxx/Darwin code.
Summary:
This reference to lit.util.capture is functionally identical to
subprocess.check_output, so this change switches to call the library routine
directly.

Reviewers: mzolotukhin, EricWF

Reviewed By: mzolotukhin

Subscribers: sanjoy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@306755 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29 23:07:27 +00:00
Eric Fiselier
924c998c0e remove incorrectly committed assertion
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305447 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15 03:02:43 +00:00
Eric Fiselier
954bf04d1d Add hack to get --param=enable_modules=true working with a __config_site header
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305446 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15 02:54:15 +00:00
Eric Fiselier
a99bc1563b Define -DNOMINMAX when running the tests on Windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@304372 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31 23:27:25 +00:00
Eric Fiselier
d3f919eb7b Disable the coroutines tests until Clang bumps __cpp_coroutines to reflect recent changes
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303837 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 05:11:40 +00:00
Eric Fiselier
737c3bf25e Add <experimental/coroutine>
This patch adds the library portions of the coroutines PDTS,
which should now be supported by Clang.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303836 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 04:36:24 +00:00
Erik Pilkington
64182a5877 [test] Add support for Objective-C++ tests
Differential revision: https://reviews.llvm.org/D33049

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303466 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-19 23:02:49 +00:00
Eric Fiselier
98e4596f65 Workaround -W#warnings on Windows until the correct fixes can land
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302743 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10 23:29:13 +00:00
Eric Fiselier
f6e8a9c876 Clean up LIT failure output by not showing the entire environment
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302713 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10 19:55:42 +00:00
Eric Fiselier
5fa184dabd Attempt to speculatively unbreak Apple build bots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302627 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10 08:04:50 +00:00
Eric Fiselier
4680f0c7e6 Improve how LIT reports the added environment variables
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10 00:23:58 +00:00
Eric Fiselier
f715326aa2 Attempt to unbreak Libc++ test configuration
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302604 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10 00:05:04 +00:00
Eric Fiselier
df432266f0 Fix test runtime environment on Windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-09 23:57:22 +00:00
Eric Fiselier
01c2bb3677 Fix misspelling of environment throughout libc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302600 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-09 23:47:20 +00:00
Ben Craig
c6aa3e7963 Fix Windows tests when __config_site is present.
Previously, the force includes would complain about a missing _DEBUG symbol.
Now we dump macros before adding the force includes to the command line.
Now with proper newlines.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302497 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-09 01:34:12 +00:00
Ben Craig
2a1cb9c2e6 Revert "Fix Windows tests when __config_site is present."
It's 2017, and line endings are still an issue.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302496 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-09 01:26:39 +00:00
Ben Craig
ed69373786 Fix Windows tests when __config_site is present.
Previously, the force includes would complain about a missing _DEBUG symbol.
Now we dump macros before adding the force includes to the command line.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302421 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 13:15:22 +00:00
Eric Fiselier
ca052ce73a Fix Windows locale detection
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302396 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 02:09:48 +00:00
Eric Fiselier
46795cca2b Revert "Actually remove the MSVC STL when linking and testing libc++ on Windows"
This reverts commit r302387.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302389 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-07 23:37:38 +00:00
Eric Fiselier
04da0e13a3 Actually remove the MSVC STL when linking and testing libc++ on Windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302387 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-07 23:19:14 +00:00
Mehdi Amini
907c1196a7 Add markup for libc++ dylib availability
Libc++ is used as a system library on macOS and iOS (amongst others). In order
for users to be able to compile a binary that is intended to be deployed to an
older version of the platform, clang provides the
availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_
that can be placed on declarations to describe the lifecycle of a symbol in the
library.

See docs/DesignDocs/AvailabilityMarkup.rst for more information.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 17:08:54 +00:00
Eric Fiselier
c94dd0a571 XFAIL Windows test failures under test/libcxx
This patch XFAIL's a number of tests under test/libcxx when on Windows.
These failures need more investigation or patches to either Clang or libc++
but for now we don't want them to prevent the bot from going green.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 01:48:02 +00:00
Eric Fiselier
b34376320f Fix 'verify-support' available feature
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300934 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 00:43:07 +00:00
Eric Fiselier
6ca6874880 Fix comment and remove incorrect linker flags in test configuration
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300881 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 20:22:19 +00:00
Eric Fiselier
23ccaa54dc Rename the static version of libc++ on Windows.
Previously both the static version of libc++ and the
import library for the DLL had the same name, 'c++.lib'.

This patch renames the static library on Windows to be `libc++.lib`
so it no longer conflicts. This naming convention is consistent with
other windows libraries.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300817 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 04:19:02 +00:00
Eric Fiselier
b105246262 Make linker errors verbose on Windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300809 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 01:50:39 +00:00
Eric Fiselier
04f2896e85 Fix typo in Windows test configuration code
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300770 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 21:52:08 +00:00
Eric Fiselier
688edc78f9 Update google benchmark
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300530 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-18 07:17:20 +00:00
Mehdi Amini
2fe5562fc1 Fix remote test execution in lit
Can be used as such:

  $ python /path/to/lit.py -sv /path/to/llvm/build/projects/libcxx/test/ \
    --param=use_system_cxx_lib=true \
    --param=executor='SSHExecutor("remote.domain", "username")'

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06 01:14:57 +00:00
Eric Fiselier
f3b3a65d89 suppress GCC warning about noexcept functions changing mangling
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299385 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-03 20:53:15 +00:00
Mehdi Amini
9783bae928 libc++ testing: fix invalid python syntax
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299057 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 05:21:33 +00:00
Mehdi Amini
e1d7c51f6e libc++ testing: fix assertion around use_system_cxx_lib
Actually fix (hopefully) the assertions about `use_system_cxx_lib`,
the previous attempt failed because I misread the error.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299056 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 05:07:18 +00:00
Mehdi Amini
6c9ed3296e libc++ config testing: use_system_cxx_lib can be a bool
Fix the libc++ Green Dragon bot.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299055 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 04:51:19 +00:00
Mehdi Amini
f18ccd87b3 libc++ testing: allow to provide a path for use_system_cxx_lib
As we're trying to setup testing / bots for all shipping version of libc++
on macOS/iOS, we'll need to be able to pass a path to where to find the
dylib for each previous version of the OS.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299053 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 04:45:33 +00:00
Mehdi Amini
e807cbcd5b Add deployment knobs to tests (for Apple platforms)
The tests for libc++ specify -target on the command-line to the
compiler, but this is problematic for a few reasons.

Firstly, the -target option isn't supported on Apple platforms. Parts
of the triple get dropped and ignored. Instead, software should be
compiled with a combination of the -arch and -m<name>-version-min
options.

Secondly, the generic "darwin" target references a kernel version
instead of a platform version. Each platform has its own independent
versions (with different versions of libc++.1.dylib), independent of the
version of the Darwin kernel.

This commit adds support to the LIT infrastructure for testing against
Apple platforms using -arch and -platform options.

If the host is not on OS X, or the compiler type is not clang or apple-clang, then this commit has NFC.
If the host is on OS X and --param=target_triple=... is specified, then a warning is emitted to use arch and platform instead. Besides the warning, there's NFC.
If the host is on OS X and *no* target-triple is specified, then use the new deployment target logic. This uses two new lit parameters, --param=arch=<arch> and --param=platform=<platform>. <platform> has the form <name>[<version>].
By default, arch is auto-detected from clang -dumpmachine, and platform is "macosx".
If the platform doesn't have a version:
For "macosx", the version is auto-detected from the host system using sw_vers. This may give a different version than the SDK, since new SDKs can be installed on older hosts.
Otherwise, the version is auto-detected from the SDK version using xcrun --show-sdk-path.
-arch <arch> -m<name>-version-min=<version> is added to the compiler flags.
The target triple is computed as <arch>-apple-<platform>. It is *not* passed to clang, but it is available for XFAIL and UNSUPPORTED (as is with_system_cxx_lib=<target>).
For convenience, apple-darwin and <arch>-apple-darwin are added to the set of available features.
There were a number of tests marked to XFAIL on x86_64-apple-darwin11
and x86_64-apple-darwin12. I updated these to
x86_64-apple-macosx10.7 and x86_64-apple-macosx10.8.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297798 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-15 00:59:54 +00:00
Eric Fiselier
45a6abf0fd Fix nonsense comment
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296965 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04 12:28:12 +00:00
Eric Fiselier
b75f6de984 teach LIT how to detect the glibc version
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296942 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04 01:29:51 +00:00
Eric Fiselier
a30d98b7ec Fix python 3 syntax error in sym_diff
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296716 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02 00:03:01 +00:00
Saleem Abdulrasool
958d196f22 test: prevent incorrect quoting of paths
The path would previously get an extra leading space as the arguments
would be parsed when generating the final command to run.  Pretokenise
the arguments to permit proper quoting of the paths.  This avoids a
number of ignoring non-existent path warnings from clang.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295511 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 23:08:46 +00:00
Eric Fiselier
b7fd0be370 Update all bug URL's to point to https://bugs.llvm.org/...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295434 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 08:37:03 +00:00
Eric Fiselier
43ec7b868c update revision in CHANGELOG.TXT and fix python error
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295399 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 01:56:57 +00:00
Eric Fiselier
0eaf2e8474 [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.
Summary:
This patch fixes http://llvm.org/PR31938. The description below is copy/pasted from the bug:

The standard says:

template<class charT, class traits = char_traits<charT>,
         class Allocator = allocator<charT>>
class basic_string {
  using value_type = typename traits::char_type;
  // ...
  basic_string(const charT* s, const Allocator& a = Allocator());
};

libc++ actually chooses to declare the constructor as

  basic_string(const value_type* s, const Allocator& a = Allocator());

The implicit deduction guides from class template argument deduction make what was previously an implementation detail visible:

std::basic_string s = "foo"; // error, can't deduce charT.

The constructor in question is in the libc++ DSO, but fortunately it looks like fixing this will not result in an ABI break.


@rsmith How does this look? I did more than just the constructors mentioned in the PR, but IDK how far to take it.


Reviewers: mclow.lists, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits, rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295393 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 01:17:10 +00:00
Eric Fiselier
e1b6382ee3 Properly escape ShellTest subsitutions on Windows. Try 2
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294721 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 06:59:07 +00:00
Eric Fiselier
f3078f63a9 properly escape compiler path in .sh.cpp tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294718 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 06:38:02 +00:00
Saleem Abdulrasool
b9eccbec08 test: allow -target usage on Windows
When running the tests on Windows with a debug build, _DEBUG must be
added to the flags prior to the -target as the forced inclusion of a
header will prevent the compile test for the flag to fail.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294716 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 06:24:34 +00:00
Eric Fiselier
4fd0d50a96 Attempt to fix finding clang++ on Windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294699 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 03:20:02 +00:00
Eric Fiselier
7be9c9ae5c Add missing libc++ import
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294673 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 00:01:01 +00:00
Eric Fiselier
5115d24d2c add missing python import
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294660 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09 23:29:08 +00:00
Eric Fiselier
ed803866ea Move libcxx/test/libcxx python package into libcxx/utils/libcxx.
This patch merges the test python package with the newly
created package in utils.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294651 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09 23:18:11 +00:00