summaryrefslogtreecommitdiffstats
path: root/libcxx/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* attempt to unbreak buildbotsEric Fiselier2019-06-142-2/+9
| | | | llvm-svn: 363442
* [libcxx] Use libtool when merging archives on Apple platformsPetr Hosek2019-06-021-2/+20
| | | | | | | | | | ar doesn't produce the correct results when used for linking static archives on Apple platforms, so instead use libtool -static which is the official way to build static archives on those platforms. Differential Revision: https://reviews.llvm.org/D62770 llvm-svn: 362311
* P0722R3: Implement library support for destroying deleteEric Fiselier2019-05-231-1/+8
| | | | | | | | | | | | | | | | | | Summary: This provides the `std::destroying_delete_t` declaration in C++2a and after. (Even when the compiler doesn't support the language feature). However, the feature test macro `__cpp_lib_destroying_delete` is only defined when we have both language support and C++2a. Reviewers: ldionne, ckennelly, serge-sans-paille, EricWF Reviewed By: EricWF Subscribers: dexonsmith, riccibruno, christof, jwakely, jdoerfert, mclow.lists, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D55840 llvm-svn: 361572
* Fix permission error while running botsEric Fiselier2019-04-281-0/+1
| | | | llvm-svn: 359405
* attempt to unbreak build botsEric Fiselier2019-04-282-5/+7
| | | | llvm-svn: 359404
* Attempt to switch to auto-scaling botsEric Fiselier2019-04-283-0/+117
| | | | llvm-svn: 359403
* Implement midpoint for floating point types. Reviewed as ↵Marshall Clow2019-04-251-0/+6
| | | | | | https://reviews.llvm.org/D61014. llvm-svn: 359184
* Add std::is_constant_evaluated.Eric Fiselier2019-04-241-1/+2
| | | | | | | | | Clang recently added __builtin_is_constant_evaluated() and GCC 9.0 has it as well. This patch adds support for it in libc++. llvm-svn: 359119
* [libcxx] Use relative path for libc++ library when generating scriptPetr Hosek2019-04-231-1/+4
| | | | | | | | | This addresses the issue introduced in D60309 which leads to linker scripts being generated with absolute paths. Differential Revision: https://reviews.llvm.org/D61039 llvm-svn: 359045
* [libcxx] Update gen_link_script.py to support different input and outputPetr Hosek2019-04-221-61/+32
| | | | | | | | | | This enables the use of this script from other build systems like GN which don't support post-build actions as well as for static archives. Differential Revision: https://reviews.llvm.org/D60309 llvm-svn: 358915
* [libc++] Link against libc++abi in the libc++abi testsLouis Dionne2019-04-181-1/+5
| | | | | | PR27405 llvm-svn: 358712
* [libc++] Make sure we re-export some missing libc++abi symbols from libc++Louis Dionne2019-04-181-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Ensure we re-export __cxa_throw_bad_array_new_length and __cxa_uncaught_exceptions from libc++, since they are now provided by libc++abi. Doing this allows us to stop linking explicitly against libc++abi in the libc++abi tests, since libc++ re-exports all the necessary symbols. However, there is one caveat to that. We don't want libc++ to re-export __cxa_uncaught_exception (the singular form), since it's only provided for backwards compatibility. Hence, for the single test where we check this backwards compatibility, we explicitly link against libc++abi. PR27405 PR22654 Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60424 llvm-svn: 358690
* [NFC] Build libc++ verbosely in the macOS CILouis Dionne2019-04-161-2/+2
| | | | llvm-svn: 358529
* [libc++] Make sure we use new/delete from libc++abi on CI for Apple platformsLouis Dionne2019-04-161-0/+2
| | | | llvm-svn: 358524
* [libc++] Make sure that the symbol differ takes into account symbol typesLouis Dionne2019-04-151-3/+3
| | | | | | | | | | | | | | | | | Summary: Otherwise, it doesn't take into account things like whether the symbol is defined or undefined, and whether symbols are indirect references (re-exports) or not. Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60416 llvm-svn: 358408
* [libc++] Run back-deployment CI against previously-released libc++abi dylibsLouis Dionne2019-04-121-3/+1
| | | | | | | | | | | We used to do it against the current system's libc++abi, which is not as good as doing it with the libc++abi that matches the libc++ we're running against. Note that I made sure we were indeed picking up the provided libc++abi by replacing it by something that doesn't work and watching it burn. llvm-svn: 358294
* 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
OpenPOWER on IntegriCloud