Commit Graph

83 Commits

Author SHA1 Message Date
Martin Storsjo fb8eb6fce8 Use CMAKE_AR instead of the system default 'ar' for merging static libraries
Using the system default 'ar' might not be the right choice when
cross compiling.

Don't prepend the ar options by a dash, not all ar implementations
support that (llvm-ar doesn't).

Also pass the 's' option when creating the merged library, to create
an index.

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

llvm-svn: 313122
2017-09-13 06:55:44 +00:00
Martell Malone f922501d98 libcxx: fix merge_archives error variable name
Differential Revision: https://reviews.llvm.org/D37728

llvm-svn: 313084
2017-09-12 22:32:02 +00:00
Martin Storsjo 499f58a548 Handle object files named *.obj in merge_archives.py
Differential Revision: https://reviews.llvm.org/D37133

llvm-svn: 313072
2017-09-12 20:54:15 +00:00
Brian Cain 086b6682dd XFAIL tests on SLES11
XFAIL some failing tests for SLES11 (older glibc), also replace spaces
in linux distro w/dashes.

llvm-svn: 312774
2017-09-08 03:57:02 +00:00
Eric Fiselier 766233b153 Fix issues with UBSAN test configuration.
On Apple the test feature 'sanitizer-new-delete' was incorrectly
getting added to the LIT feature set, which mistakenly caused tests
to be disabled when using UBSAN (the feature is only needed with ASAN/MSAN/TSAN).

llvm-svn: 307518
2017-07-10 04:32:21 +00:00
Eric Fiselier 433c2f0859 Fix filesystem build on platforms with weird time_t types.
32-bit powerpc provides a 64 bit time_t type and older ppc64 systems
provide time_t as a floating point type. This caused problems when building
operations.cpp since operations.cpp contained compile time tests for conversions
between time_t and filesystem time type.

When these tests failed they caused the libc++ build to fail as well. This is unfortunate.

This patch moves the tests out of the source file and into the test suite. It also
expands the tests to allow testing of the weird time_t configurations on all platforms.

llvm-svn: 307461
2017-07-08 04:18:41 +00:00
Duncan P. N. Exon Smith 66631a12b8 cmath: Support clang's -fdelayed-template-parsing
r283051 added some functions to cmath (in namespace std) that have the
same name as functions in math.h (in the global namespace).  Clang's
limited support for `-fdelayed-template-parsing` chokes on this.  Rename
the ones in `cmath` and their uses in `complex` and the test.

rdar://problem/32848355

llvm-svn: 307357
2017-07-07 05:13:36 +00:00
Eric Fiselier 226dbd78eb Suppress -Waligned-allocation-unavailable warning in libc++ test suite
llvm-svn: 307218
2017-07-05 22:40:58 +00:00
David L. Jones 8e293f15db [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

llvm-svn: 306755
2017-06-29 23:07:27 +00:00
Eric Fiselier 40eaecc35e remove incorrectly committed assertion
llvm-svn: 305447
2017-06-15 03:02:43 +00:00
Eric Fiselier 1d2274d9a6 Add hack to get --param=enable_modules=true working with a __config_site header
llvm-svn: 305446
2017-06-15 02:54:15 +00:00
Eric Fiselier baa9198585 Define -DNOMINMAX when running the tests on Windows
llvm-svn: 304372
2017-05-31 23:27:25 +00:00
Eric Fiselier d791d4ea3c Disable the coroutines tests until Clang bumps __cpp_coroutines to reflect recent changes
llvm-svn: 303837
2017-05-25 05:11:40 +00:00
Eric Fiselier 3ca9185073 Add <experimental/coroutine>
This patch adds the library portions of the coroutines PDTS,
which should now be supported by Clang.

llvm-svn: 303836
2017-05-25 04:36:24 +00:00
Erik Pilkington 0de31c7e53 [test] Add support for Objective-C++ tests
Differential revision: https://reviews.llvm.org/D33049

llvm-svn: 303466
2017-05-19 23:02:49 +00:00
Eric Fiselier 3853a41754 Workaround -W#warnings on Windows until the correct fixes can land
llvm-svn: 302743
2017-05-10 23:29:13 +00:00
Eric Fiselier 7b08184d46 Clean up LIT failure output by not showing the entire environment
llvm-svn: 302713
2017-05-10 19:55:42 +00:00
Eric Fiselier fc861f511a Attempt to speculatively unbreak Apple build bots
llvm-svn: 302627
2017-05-10 08:04:50 +00:00
Eric Fiselier 9311603160 Improve how LIT reports the added environment variables
llvm-svn: 302607
2017-05-10 00:23:58 +00:00
Eric Fiselier d1eff0e813 Attempt to unbreak Libc++ test configuration
llvm-svn: 302604
2017-05-10 00:05:04 +00:00
Eric Fiselier 3388f7c0cb Fix test runtime environment on Windows
llvm-svn: 302602
2017-05-09 23:57:22 +00:00
Eric Fiselier 78046e4624 Fix misspelling of environment throughout libc++
llvm-svn: 302600
2017-05-09 23:47:20 +00:00
Ben Craig bb497d3895 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.

llvm-svn: 302497
2017-05-09 01:34:12 +00:00
Ben Craig ff63090b0e Revert "Fix Windows tests when __config_site is present."
It's 2017, and line endings are still an issue.

llvm-svn: 302496
2017-05-09 01:26:39 +00:00
Ben Craig 9669df28d4 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.

llvm-svn: 302421
2017-05-08 13:15:22 +00:00
Eric Fiselier c2d3f4c604 Fix Windows locale detection
llvm-svn: 302396
2017-05-08 02:09:48 +00:00
Eric Fiselier 10cb6ca12b Revert "Actually remove the MSVC STL when linking and testing libc++ on Windows"
This reverts commit r302387.

llvm-svn: 302389
2017-05-07 23:37:38 +00:00
Eric Fiselier ca40e602bf Actually remove the MSVC STL when linking and testing libc++ on Windows
llvm-svn: 302387
2017-05-07 23:19:14 +00:00
Mehdi Amini e9c66ad9fa 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

llvm-svn: 302172
2017-05-04 17:08:54 +00:00
Eric Fiselier 0ea799a79c 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.

llvm-svn: 300941
2017-04-21 01:48:02 +00:00
Eric Fiselier df8f1c0fc7 Fix 'verify-support' available feature
llvm-svn: 300934
2017-04-21 00:43:07 +00:00
Eric Fiselier 91bd4d9048 Fix comment and remove incorrect linker flags in test configuration
llvm-svn: 300881
2017-04-20 20:22:19 +00:00
Eric Fiselier 70a3eb60ed 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.

llvm-svn: 300817
2017-04-20 04:19:02 +00:00
Eric Fiselier 536339e18e Make linker errors verbose on Windows
llvm-svn: 300809
2017-04-20 01:50:39 +00:00
Eric Fiselier 4a3a870da9 Fix typo in Windows test configuration code
llvm-svn: 300770
2017-04-19 21:52:08 +00:00
Eric Fiselier 133a72069e Update google benchmark
llvm-svn: 300530
2017-04-18 07:17:20 +00:00
Mehdi Amini 9cf881e62a 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")'

llvm-svn: 299607
2017-04-06 01:14:57 +00:00
Eric Fiselier e4bda11453 suppress GCC warning about noexcept functions changing mangling
llvm-svn: 299385
2017-04-03 20:53:15 +00:00
Mehdi Amini e8cc73ebe7 libc++ testing: fix invalid python syntax
llvm-svn: 299057
2017-03-30 05:21:33 +00:00
Mehdi Amini 566279fad7 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.

llvm-svn: 299056
2017-03-30 05:07:18 +00:00
Mehdi Amini 322757cae9 libc++ config testing: `use_system_cxx_lib` can be a bool
Fix the libc++ Green Dragon bot.

llvm-svn: 299055
2017-03-30 04:51:19 +00:00
Mehdi Amini f029dcdb98 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

llvm-svn: 299053
2017-03-30 04:45:33 +00:00
Mehdi Amini f8764e30d5 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.

llvm-svn: 297798
2017-03-15 00:59:54 +00:00
Eric Fiselier 065c1abc5e Fix nonsense comment
llvm-svn: 296965
2017-03-04 12:28:12 +00:00
Eric Fiselier 51383a60c0 teach LIT how to detect the glibc version
llvm-svn: 296942
2017-03-04 01:29:51 +00:00
Eric Fiselier 803a491a64 Fix python 3 syntax error in sym_diff
llvm-svn: 296716
2017-03-02 00:03:01 +00:00
Saleem Abdulrasool aa62a752ee 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.

llvm-svn: 295511
2017-02-17 23:08:46 +00:00
Eric Fiselier 3c35491f02 Update all bug URL's to point to https://bugs.llvm.org/...
llvm-svn: 295434
2017-02-17 08:37:03 +00:00
Eric Fiselier e13037046a update revision in CHANGELOG.TXT and fix python error
llvm-svn: 295399
2017-02-17 01:56:57 +00:00
Eric Fiselier dd3ba794ef [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

llvm-svn: 295393
2017-02-17 01:17:10 +00:00