[libc++] Remove support for CloudABI, which has been abandonedBased on https://github.com/NuxiNL/cloudlibc, it appears that the CloudABIproject has been abandoned. This patch removes a bunch of Cl
[libc++] Remove support for CloudABI, which has been abandonedBased on https://github.com/NuxiNL/cloudlibc, it appears that the CloudABIproject has been abandoned. This patch removes a bunch of CloudABI specificlogic that had been added to support that platform.Note that some knobs like LIBCXX_ENABLE_STDIN and LIBCXX_ENABLE_STDOUTcoud be useful in their own right, however those are currently broken.If we want to re-add such knobs in the future, we can do it like we'vedone it for localization & friends so that we can officially supportthat configuration.Differential Revision: https://reviews.llvm.org/D108637
show more ...
Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended.llvm-svn: 362252
Support tests in freestandingSummary:Freestanding is *weird*. The standard allows it to differ in a bunch of oddmanners from regular C++, and the committee would like to improve thatsituation. I
Support tests in freestandingSummary:Freestanding is *weird*. The standard allows it to differ in a bunch of oddmanners from regular C++, and the committee would like to improve thatsituation. I'd like to make libc++ behave better with what freestanding shouldbe, so that it can be a tool we use in improving the standard. To do that weneed 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, usingclang 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" propertyhas 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'tcreate 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 justfalls of the end and does whatever undefined behavior (if you're luck, ud2leading to non-zero return code).Let's start my work with the basics. This patch changes all libc++ tests todeclare `main` as `int main(int, char**` so it mangles consistently (enabling usto declare another `extern "C"` main for freestanding which calls the mangledone), and adds `return 0;` to all places where it was missing. This touches 6124files, 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/793819ff360baa845483dde81170feedThis 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 filesystemtests), etc.Once this is in we can create a freestanding bot which will prevent furtherregressions. After that, we can start the real work of supporting C++freestanding fairly well in libc++.<rdar://problem/47754795>Reviewers: ldionne, mclow.lists, EricWFSubscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commitsDifferential Revision: https://reviews.llvm.org/D57624llvm-svn: 353086
Update more file headers across all of the LLVM projects in the monorepoto reflect the new license. These used slightly different spellings thatdefeated my regular expressions.We understand that
Update more file headers across all of the LLVM projects in the monorepoto reflect the new license. These used slightly different spellings thatdefeated my regular expressions.We understand that people may be surprised that we're moving the headerentirely to discuss the new license. We checked this carefully with theFoundation's lawyer and we believe this is the correct approach.Essentially, all code in the project is now made available by the LLVMproject under our new license, so you will see that the license headersinclude that license only. Some of our contributors have contributedcode under our old license, and accordingly, we have retained a copy ofour old license notice in the top-level files in each project andrepository.llvm-svn: 351648
Move remaining _LIBCPP_VERSION tests into test/libcxxllvm-svn: 273367
Void cast runtime-unused variables. Patch from [email protected]llvm-svn: 268284
Make support for thread-unsafe C functions optional.One of the aspects of CloudABI is that it aims to help you write codethat is thread-safe out of the box. This is very important if you wantto w
Make support for thread-unsafe C functions optional.One of the aspects of CloudABI is that it aims to help you write codethat is thread-safe out of the box. This is very important if you wantto write libraries that are easy to reuse. For CloudABI we decided tonot provide the thread-unsafe functions. So far this is working outpretty well, as thread-unsafety issues are detected really early on.The following patch adds a knob to libc++,_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disablethread-unsafe functions that can easily be avoided in practice. Thefollowing functions are not thread-safe:- <clocale>: locale handles should be preferred over setlocale().- <cstdlib>: mbrlen(), mbrtowc() and wcrtomb() should be preferred over their non-restartable counterparts.- <ctime>: asctime(), ctime(), gmtime() and localtime() are not thread-safe. The first two are also deprecated by POSIX.Differential Revision: http://reviews.llvm.org/D8703Reviewed by: marshallllvm-svn: 240527
Move test into test/std subdirectory.llvm-svn: 224658