Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
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