summaryrefslogtreecommitdiffstats
path: root/libcxx/utils
Commit message (Collapse)AuthorAgeFilesLines
* Handle TLS values in sym_checkEric Fiselier2019-04-041-1/+1
| | | | llvm-svn: 357705
* [libc++] Add proper XFAILs for shared_mutex testsLouis Dionne2019-03-271-0/+4
| | | | | | | | | | Dylib support for shared_mutex was added in macOS 10.12, so the tests should be XFAILed accordingly instead of being completely disabled whenever availability is enabled. rdar://problem/48769104 llvm-svn: 357079
* [libc++][CMake] Allow merging libc++abi.a into libc++ even on Apple platformsLouis Dionne2019-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: I can't see a good reason to disallow this, even though it isn't the standard way we build libc++ for Apple platforms. Making this work on Apple platforms requires using different flags for --whole-archive and removing the -D flag when running `ar` to merge archives because that flag isn't supported by the `ar` shipped on Apple platforms. This shouldn't be an issue since the -D option appears to be enabled by default in GNU `ar`. Reviewers: phosek, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D59513 llvm-svn: 356903
* Add dylib-has-no-filesystem when filesystem is disabledEric Fiselier2019-03-211-0/+2
| | | | llvm-svn: 356640
* Allow disabling of filesystem library.Eric Fiselier2019-03-211-0/+3
| | | | | | | | | | | | | | Summary: Filesystem doesn't work on Windows, so we need a mechanism to turn it off for the time being. Reviewers: ldionne, serge-sans-paille, EricWF Reviewed By: EricWF Subscribers: mstorsjo, mgorny, christof, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59619 llvm-svn: 356633
* [libc++] Use the compiler that CMake found when running lit for ↵Louis Dionne2019-03-201-1/+0
| | | | | | back-deployment tests llvm-svn: 356595
* [libc++] Do not force going through xcrun to find Clang in the macOS CI scriptsLouis Dionne2019-03-202-6/+1
| | | | | | | It should be possible to run those CI scripts with different compilers by simply exporting a different CXX environment variable. llvm-svn: 356562
* [libc++] Mark <filesystem> tests as failing when the dylib doesn't support ↵Louis Dionne2019-03-201-0/+4
| | | | | | | | | | | | filesystem This fixes CI for back-deployment testers on platforms that don't have <filesystem> support in the dylib. This is effectively half of https://reviews.llvm.org/D59224. The other half requires fixes in Clang. llvm-svn: 356558
* [libc++] Build <filesystem> support as part of the dylibLouis Dionne2019-03-193-24/+4
| | | | | | | | | | | | | | | | | | | Summary: This patch treats <filesystem> as a first-class citizen of the dylib, like all other sub-libraries (e.g. <chrono>). As such, it also removes all special handling for installing the filesystem library separately or disabling part of the test suite from the lit command line. Unlike the previous attempt (r356500), this doesn't remove all the filesystem tests. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59152 llvm-svn: 356518
* Revert "[libc++] Build <filesystem> support as part of the dylib"Louis Dionne2019-03-193-4/+24
| | | | | | | | When I applied r356500 (https://reviews.llvm.org/D59152), I somehow deleted all of filesystem's tests. I will revert r356500 and re-apply it properly. llvm-svn: 356505
* [libc++] Build <filesystem> support as part of the dylibLouis Dionne2019-03-193-24/+4
| | | | | | | | | | | | | | | | Summary: This patch treats <filesystem> as a first-class citizen of the dylib, like all other sub-libraries (e.g. <chrono>). As such, it also removes all special handling for installing the filesystem library separately or disabling part of the test suite from the lit command line. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59152 llvm-svn: 356500
* [libc++] Only add dylib-related features when using the system's libc++Louis Dionne2019-03-051-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, when testing trunk libc++ on an older system, lit will think that the dylib features are disabled. Ideally, we'd have a notion of running the tests with/without a deployment target (or, equivalently, a deployment target representing trunk where everything is as recent as can be). Since we always have a deployment target right now (which defaults to the current system), we only enable those features when we're going to also be testing with the system libc++. We also need to disable the availability markup when we are not running a system library flavor, because availability markup does not make sense when building against the trunk libc++ (which has everything regardless of what the current system is). This is a re-application of r353319, which had been reverted due to CI breakage. This time around, I made sure it didn't break our internal CI before submitting. This is also a partial undoing of r348296, in spirit at least. However, with this patch, availability markup is enabled based on whether we're using a system library or not, whereas previously one could enable it or disable it arbitrarily. This was confusing as it led to testing configurations that don't make sense (such as testing a system library without availability markup, or trunk testing with availability markup). llvm-svn: 355451
* Fix -fsanitize=vptr badness in <__debug>Eric Fiselier2019-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes a lifetime bug when inserting a new container into the debug database. It is diagnosed by UBSAN when debug mode is enabled. This patch corrects how nodes are constructed during insertion. The fix requires unconditionally breaking the debug mode ABI. Users should not expect ABI stability from debug mode. Reviewers: ldionne, serge-sans-paille, EricWF Reviewed By: EricWF Subscribers: mclow.lists, christof, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D58011 llvm-svn: 355367
* Install GCC 5 on buildbots to replace GCC 4.9.Eric Fiselier2019-03-041-3/+3
| | | | | | | | | | | LLVM is dropping support for GCC 4.9. This patch adds a GCC 5 installation to the buildbot image so we can upgrade the 4.9 bot to GCC 5. As a temporary workaround until zorg updates, we install GCC 5 as GCC 4.9. llvm-svn: 355334
* [NFC][libc++] Update comment about oldest supported macosx for back-deploymentLouis Dionne2019-02-271-1/+1
| | | | llvm-svn: 355043
* Make the sym_diff utilities more useful.Eric Fiselier2019-02-123-17/+40
| | | | | | In particular when working with static libraries and libstdc++. llvm-svn: 353772
* [libcxx] Preserve order, avoid duplicates when merging static archivesPetr Hosek2019-02-111-8/+9
| | | | | | | | | | | glob can return files in arbitrary order which breaks deterministic builds. Rather, use `ar t` to list the files in each archive and preserve the original order. Using `ar q` results in duplicate entries in the archive, instead use `ar r` to avoid duplicates. Differential Revision: https://reviews.llvm.org/D58024 llvm-svn: 353671
* The new file header didn't get carried over when these files wereChandler Carruth2019-02-112-8/+6
| | | | | | "moved" somehow, update them to use it. llvm-svn: 353669
* Format sym_extract.py output to minimize diff output.Eric Fiselier2019-02-101-1/+3
| | | | | | | | Different versions of python print dictionaries in different orders. This can mess up diffs when updating ABI lists. This patch uses pprint.pformat to print the dicts to get a consistent ordering. llvm-svn: 353634
* [libcxx] Support runtimes and monorepo locations for testsPetr Hosek2019-02-091-3/+9
| | | | | | | | | | | | | | | | | The test configuration support currently searches for libc++ sources in <ROOT>/projects/libcxx. This change also additionally searches <ROOT>/runtimes/libcxx (so called runtimes layout) and <ROOT>/libcxx (monorepo layout). This matches the logic we already use in CMake, for example: https://github.com/llvm/llvm-project/blob/6fd4e7f/libcxx/CMakeLists.txt#L148 When the monorepo becomes the only supported layout in the future, we can simplify this logic again. Differential Revision: https://reviews.llvm.org/D57776 llvm-svn: 353600
* Revert "[libc++] Only add dylib-related features when using the system's libc++"Louis Dionne2019-02-061-1/+1
| | | | | | This reverts r353319, which broke our internal CI. llvm-svn: 353321
* [libc++] Only add dylib-related features when using the system's libc++Louis Dionne2019-02-061-1/+1
| | | | | | | | | | | | Otherwise, when testing trunk libc++ on an older system, lit will think that the dylib features are disabled. Ideally, we'd have a notion of running the tests with/without a deployment target (or, equivalently, a deployment target representing trunk where everything is as recent as can be). Since we always have a deployment target right now (which defaults to the current system), we only enable those features when we're going to also be testing with the system libc++. llvm-svn: 353319
* [CMake] Support compiler-rt builtins library in testsPetr Hosek2019-02-051-2/+4
| | | | | | | | | | | | | | | | | | | | We're building tests with -nostdlib which means that we need to explicitly include the builtins library. When using libgcc (default) we can simply include -lgcc_s on the link line, but when using compiler-rt builtins we need a complete path to the builtins library. This path is already available in CMake as <PROJECT>_BUILTINS_LIBRARY, so we just need to pass that path to lit and if config.compiler_rt is true, link it to the test. Prior to this patch, running tests when compiler-rt is being used as the builtins library was broken as all tests would fail to link, but with this change running tests when compiler-rt bultins library is being used should be supported. Differential Revision: https://reviews.llvm.org/D56701 llvm-svn: 353208
* [libcxx] Start defining lit features for tests depending on availabilityLouis Dionne2019-02-051-0/+12
| | | | | | | | | | | | | | | | | This patch removes some vendor-specific availability XFAILs from the test suite. In the future, when a new feature is introduced in the dylib, an availability macro should be created and a matching lit feature should be created. That way, the test suite can XFAIL whenever the implementation lacks the necessary feature instead of being cluttered by vendor-specific annotations. Right now, those vendor-specific annotations are still somewhat cluttering the test suite by being in `config.py`, but at least they are localized. In the future, we could design a way to define those less intrusively or even automatically based on the availability macros that already exist in <__config>. llvm-svn: 353201
* [libc++] Control whether exceptions are enabled in the macOS trunk testing ↵Louis Dionne2019-02-051-7/+15
| | | | | | script llvm-svn: 353185
* Fix double curliesJF Bastien2019-02-051-1/+1
| | | | | | Pointed out by Arthur in D57624. llvm-svn: 353140
* [CMake] Update lit test configurationPetr Hosek2019-02-051-4/+4
| | | | | | | | | There are several changes: - Don't stringify Pythonized bools (that's why we're Pythonizing them) - Support specifying target and sysroot via CMake variables - Use consistent spelling for --target, --sysroot, --gcc-toolchain llvm-svn: 353137
* Support tests in freestandingJF Bastien2019-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Freestanding is *weird*. The standard allows it to differ in a bunch of odd manners from regular C++, and the committee would like to improve that situation. I'd like to make libc++ behave better with what freestanding should be, so that it can be a tool we use in improving the standard. To do that we need to try stuff out, both with "freestanding the language mode" and "freestanding the library subset". Let's start with the super basic: run the libc++ tests in freestanding, using clang as the compiler, and see what works. The easiest hack to do this: In utils/libcxx/test/config.py add: self.cxx.compile_flags += ['-ffreestanding'] Run the tests and they all fail. Why? Because in freestanding `main` isn't special. This "not special" property has two effects: main doesn't get mangled, and main isn't allowed to omit its `return` statement. The first means main gets mangled and the linker can't create a valid executable for us to test. The second means we spew out warnings (ew) and the compiler doesn't insert the `return` we omitted, and main just falls of the end and does whatever undefined behavior (if you're luck, ud2 leading to non-zero return code). Let's start my work with the basics. This patch changes all libc++ tests to declare `main` as `int main(int, char**` so it mangles consistently (enabling us to declare another `extern "C"` main for freestanding which calls the mangled one), and adds `return 0;` to all places where it was missing. This touches 6124 files, and I apologize. The former was done with The Magic Of Sed. The later was done with a (not quite correct but decent) clang tool: https://gist.github.com/jfbastien/793819ff360baa845483dde81170feed This works for most tests, though I did have to adjust a few places when e.g. the test runs with `-x c`, macros are used for main (such as for the filesystem tests), etc. Once this is in we can create a freestanding bot which will prevent further regressions. After that, we can start the real work of supporting C++ freestanding fairly well in libc++. <rdar://problem/47754795> Reviewers: ldionne, mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commits Differential Revision: https://reviews.llvm.org/D57624 llvm-svn: 353086
* Move the feature test macros script to the utils directory.Eric Fiselier2019-02-021-0/+976
| | | | | | | It doesn't make a lot of sense to keep it with the tests, deep into the test suite directonies. llvm-svn: 352970
* Improve docker images and configuration; create compiler-zoo imageEric Fiselier2019-01-199-365/+395
| | | | llvm-svn: 351667
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1920-80/+60
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* Fix all the bots.Eric Fiselier2019-01-191-3/+3
| | | | | | | The buildbot start scripts hardcode the version string. Bump it from 8 to 9. llvm-svn: 351638
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-196-24/+18
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [libcxx] Add a script to run CI on older MacOS versionsLouis Dionne2019-01-091-0/+180
| | | | | | | | This script can be used by CI systems to test things like availability markup and binary compatibility on older MacOS versions. This is still a bit rough on the edges, for example we don't test libc++abi yet. llvm-svn: 350752
* [libcxx] Add a script to run CI on MacOSLouis Dionne2019-01-091-0/+153
| | | | | | | CI systems like Green Dragon should use this script so as to make reproducing errors easy locally. llvm-svn: 350740
* Revert "D56064: More tolerance for flaky tests in libc++ on NetBSD"Kamil Rytarowski2019-01-051-7/+0
| | | | | | Requested by EricWF. llvm-svn: 350477
* More tolerance for flaky tests in libc++ on NetBSDKamil Rytarowski2018-12-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Tests marked with the flaky attribute ("FLAKY_TEST.") can still report false positives in local tests and on the NetBSD buildbot. Additionally a number of tests (probably all threaded ones) unmarked with the flaky attribute is flaky on NetBSD. An ideal solution on the libcxx side would be to raise max retries for NetBSD and mark failing tests with the flaky flag, however this adds more maintenance burden and constant monitoring of flaky tests. Reduce the work and handle flaky tests as more flaky on NetBSD and allow flakiness of other tests on NetBSD. Reviewers: mgorny, EricWF Reviewed By: mgorny Subscribers: christof, llvm-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D56064 llvm-svn: 350170
* [test] Add target_info for NetBSD, and XFAIL some of locale testsMichal Gorny2018-12-171-0/+13
| | | | | | | | | | | | | | | | | | | | Add a target_info definition for NetBSD. The definition is based on the one used by FreeBSD, with libcxxrt replaced by libc++abi, and using llvm-libunwind since we need to use its unwinder implementation to build anyway. Additionally, XFAIL the 30 tests that fail because of non-implemented locale features. According to the manual, NetBSD implements only LC_CTYPE part of locale handling. However, there is a locale database in the system and locale specifications are validated against it, so it makes sense to list the common locales as supported. If I'm counting correctly, this change enables additional 43 passing tests. Differential Revision: https://reviews.llvm.org/D55767 llvm-svn: 349379
* Try 2: Fix bug in buildbot start scriptEric Fiselier2018-12-151-1/+1
| | | | llvm-svn: 349236
* Fix bug in buildbot start scriptEric Fiselier2018-12-151-1/+1
| | | | llvm-svn: 349235
* Rework docker setup to make it easier to work around bugs on buildbotsEric Fiselier2018-12-153-2/+19
| | | | llvm-svn: 349234
* [libcxx] Make sure use_system_cxx_lib does not override cxx_runtime_root for ↵Louis Dionne2018-12-141-4/+4
| | | | | | | | | | | | DYLD_LIBRARY_PATH Otherwise, even specifying a runtime root different from the library we're linking against won't work -- the library we're linking against is always used. This is undesirable if we try testing something like linking against a recent libc++.dylib but running the tests against an older version (the back-deployment use case). llvm-svn: 349171
* Update google benchmark againEric Fiselier2018-12-143-12/+31
| | | | llvm-svn: 349127
* Update google benchmark versionEric Fiselier2018-12-1417-100/+194
| | | | llvm-svn: 349126
* [libcxx] Only enable the availability LIT feature when we're testing libc++Louis Dionne2018-12-111-2/+4
| | | | | | | | Other standard libraries don't implement availability markup, so it doesn't make sense to e.g. XFAIL tests based on availability markup outside of libc++. llvm-svn: 348871
* [libcxx] Remove the no_default_flags LIT configurationLouis Dionne2018-12-111-36/+32
| | | | | | | | | This is part of an ongoing cleanup of the LIT test suite, where I'm trying to reduce the number of configuration options. In this case, the original intent seemed to be running the test suite with libstdc++, but this is now supported by specifying cxx_stdlib_under_test=libstdc++. llvm-svn: 348868
* [NFC] Fix incorrect (but unreachable) LIT error messageLouis Dionne2018-12-111-3/+1
| | | | | | | | It is unreachable because we test that the cxx_stdlib_under_test is in the supported set of libraries elsewhere. Furthermore, this code relied on the `use_stdlib_type`, which is never defined. llvm-svn: 348867
* [libcxx] Remove the availability_markup LIT featureLouis Dionne2018-12-071-4/+1
| | | | | | | It is now equivalent to the 'availability' LIT feature, so there's no reason to keep both. llvm-svn: 348653
* [libcxx] Always convert 'use_system_cxx_lib' to an absolute pathLouis Dionne2018-12-061-0/+1
| | | | | | | | Otherwise, some tests would fail when a relative path was passed, because they'd use the relative path from a different directory than the current working directory. llvm-svn: 348525
* [libcxx] Always enable availability in the lit test suite.Louis Dionne2018-12-041-12/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: Running the tests without availability enabled doesn't really make sense: availability annotations allow catching errors at compile-time instead of link-time. Running the tests without availability enabled allows confirming that a test breaks at link-time under some configuration, but it is more useful to instead check that it should fail at compile-time. Always enabling availability in the lit test suite will greatly simplify XFAILs and troubleshooting of failing tests, which is currently a giant pain because we have these two levels of possible failure: link-time and compile-time. Reviewers: EricWF, mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D55079 llvm-svn: 348296
OpenPOWER on IntegriCloud