Commit Graph

91 Commits

Author SHA1 Message Date
Petr Hosek
95b20f885c [libcxx] Support the use of compiler-rt in lit tests
Don't link tests against libgcc when compiler-rt is being used.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322044 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-08 23:36:53 +00:00
Eric Fiselier
7228160964 Attempt to fix template depth test failures on older Clang versions
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318625 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-19 09:46:34 +00:00
Eric Fiselier
7e73ea873f Teach test suite about C++2a dialect flag.
This patch teaches the test suite configuration about the -std=c++2a
flag. And, since it's the newest dialect, change the test suite to
choose it, if possible, by default.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:26:23 +00:00
Eric Fiselier
6efb1c19a7 Change test suite to support c++17 dialect flag instead of c++1z.
This patch changes the test suite to attempt and prefer -std=c++17 over
-std=c++1z. It also fixes the REQUIRES and UNSUPPORTED lit markers
to refer to c++17 over c++1z.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317610 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:20:58 +00:00
Shoaib Meenai
18dba06924 [libc++] Support Microsoft ABI without vcruntime headers
The vcruntime headers are hairy and clash with both libc++ headers
themselves and other libraries. libc++ normally deals with the clashes
by deferring to the vcruntime headers and silencing its own definitions,
but for clients which don't want to depend on vcruntime headers, it's
desirable to support the opposite, i.e. have libc++ provide its own
definitions.

Certain operator new/delete replacement scenarios are not currently
supported in this mode, which requires some tests to be marked XFAIL.
The added documentation has more details.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315234 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-09 19:25:17 +00:00
Shoaib Meenai
2bba98eea0 [libc++] Add site config option for ABI macros
Some ABI macros affect headers, so it's nice to have a site config
option for them. Add a LIBCXX_ABI_DEFINES cmake macro to allow
specifying a list of ABI macros to define in the site config.

The primary design constraint (as discussed with Eric on IRC a while
back) was to not have to repeat the ABI macro names in cmake, which only
leaves a free-form cmake list as an option. A somewhat unfortunate
consequence is that we can't verify that the ABI macros being defined
actually exist, though we can at least perform some basic sanity
checking, since all the ABI macros begin with _LIBCPP_ABI_.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@314946 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-04 23:17:12 +00:00
Eric Fiselier
28dd96b8a9 Fix test suite misconfiguration on OS X
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@314755 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-03 02:25:05 +00:00
Eric Fiselier
5fe8797d57 Improve test runner output for broken configurations.
Previously LIT would often fail while attempting to set up/configure
the test compiler; normally when attempting to dump the builtin macros.
This sort of failure provided no useful information about what went
wrong with the compiler, making the actual issues hard --- if not
impossible --- to debug easily.

This patch changes the LIT configuration to report the failure explicitly,
including the failed compile command and the stdout/stderr output.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@314735 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-02 22:52:51 +00:00
Martin Storsjo
5f919fe349 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13 06:55:44 +00:00
Martell Malone
8122e2490e libcxx: fix merge_archives error variable name
Differential Revision: https://reviews.llvm.org/D37728

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313084 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-12 22:32:02 +00:00
Martin Storsjo
2c607f47f9 Handle object files named *.obj in merge_archives.py
Differential Revision: https://reviews.llvm.org/D37133

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313072 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-12 20:54:15 +00:00
Brian Cain
11762b4acd XFAIL tests on SLES11
XFAIL some failing tests for SLES11 (older glibc), also replace spaces
in linux distro w/dashes.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@312774 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-08 03:57:02 +00:00
Eric Fiselier
6bfa7316ad 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).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307518 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-10 04:32:21 +00:00
Eric Fiselier
b2e9337b06 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307461 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-08 04:18:41 +00:00
Duncan P. N. Exon Smith
e452f6a7e3 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307357 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 05:13:36 +00:00
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