summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2018-02-12Merging r324855:Hans Wennborg
------------------------------------------------------------------------ r324855 | dim | 2018-02-11 23:31:05 +0100 (Sun, 11 Feb 2018) | 26 lines Add default C++ ABI libname and include paths for FreeBSD Summary: As noted in a discussion about testing the LLVM 6.0.0 release candidates (with libc++) for FreeBSD, many tests turned out to fail with "exception_ptr not yet implemented". This was because libc++ did not choose the correct C++ ABI library, and therefore it fell back to the `exception_fallback.ipp` header. Since FreeBSD 10.x, we have been using libcxxrt as our C++ ABI library, and its headers have always been installed in /usr/include/c++/v1, together with the (system) libc++ headers. (Older versions of FreeBSD used GNU libsupc++ by default, but these are now unsupported.) Therefore, if we are building libc++ for FreeBSD, set: * `LIBCXX_CXX_ABI_LIBNAME` to "libcxxrt" * `LIBCXX_CXX_ABI_INCLUDE_PATHS` to "/usr/include/c++/v1" by default. Reviewers: emaste, EricWF, mclow.lists Reviewed By: EricWF Subscribers: mgorny, cfe-commits, krytarowski Differential Revision: https://reviews.llvm.org/D43166 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_60@324874 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-03Drop 'svn' suffix from the version number.Hans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_60@321740 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01Include AddLLVM needed for tests in the right contextPetr Hosek
AddLLVM is needed for several functions that are used in tests and as such needs to be included from the right context which previously wasn't the case. Differential Revision: https://reviews.llvm.org/D40280 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319515 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-09[libc++] Support Microsoft ABI without vcruntime headersShoaib Meenai
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-05[libc++] Clarify names of ABI forcing macrosShoaib Meenai
Make it clear that these are intended only to force a specific ABI when the autodetection would give the wrong result by renaming the cmake options and adding separate forcing macros, as suggested by EricWF in the post-commit review of r314949 and further discussed on IRC. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@314965 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-04[libc++] Move cache variable definition. NFCShoaib Meenai
Move it to where the other ABI cache variables/options are defined. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@314950 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-04[libc++] Allow users to explicitly specify ABIShoaib Meenai
libc++'s current heuristic for detecting Itanium vs. Microsoft ABI falls short in some cases. For example, it will detect windows-itanium targets as using the Microsoft ABI, since they set `_MSC_VER` (for compatibility with Microsoft headers). Leave the current heuristic in place by default but also allow users to explicitly specify the ABI if need be. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@314949 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-04[libc++] Add site config option for ABI macrosShoaib Meenai
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-09-19Resubmit "Fix llvm-lit script generation in libcxx."Zachary Turner
After speaking with the libcxx owners, they agreed that this is a bug in the bot that needs to be fixed by the bot owners, and the CMake changes are correct. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313643 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-19Revert "Fix llvm-lit script generation in libcxx."Zachary Turner
This reverts commit 4ad71811d45268d81b60f27e3b8b2bcbc23bd7b9. There is a bot that is checking out libcxx and lit with nothing else and then running lit.py against the test tree. Since there's no LLVM source tree, there's no LLVM CMake. CMake actually reports this as a warning saying unsupported libcxx configuration, but I guess someone is depending on it anyway. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-19Fix llvm-lit script generation in libcxx.Zachary Turner
Differential Revision: https://reviews.llvm.org/D37997 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313606 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14[libc++] Prevent stale site configuration headersShoaib Meenai
If we define cmake macros that require a site config, and then undefine all such macros, a stale site config header will be left behind. Explicitly delete any generate site config if we don't need one to avoid this. Differential Revision: https://reviews.llvm.org/D36720 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313284 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-19Update _LIBCPP_VERSION and the version in CMakeLists to 6.0Hans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@308468 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-11[libcxx][CMake] Add install path variable to allow overriding the destinationPetr Hosek
This is going to be used by the runtime build in the multi-target setup to allow using different install prefix for each target. Differential Revision: https://reviews.llvm.org/D33762 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307615 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-20Fix discovery of cxxabi.h in the monorepo layoutReid Kleckner
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305841 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25Add <experimental/coroutine>Eric Fiselier
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-04test commitEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04test commitEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302120 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04[libcxx][CMake] Set library dir when built under runtimes/Jonas Hahnfeld
This will put libraries into the build root's lib/ directory by default. Differential Revision: https://reviews.llvm.org/D32736 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302117 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03CMake: Only add test/ subdirectory when it existsDuncan P. N. Exon Smith
r296685 started adding the test/ subdirectory even when LIBCXX_INCLUDE_TESTS=OFF. This is great for testing libcxx standalone, but it also breaks the build when the test/ subdirectory is removed (and our submission system strips all test/ directories). This patch updates the logic to check for test/ before adding it. rdar://problem/31931366 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302095 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20[libc++] Default to vcruntime when targeting MSVCShoaib Meenai
Summary: libc++abi is never the right option for LIBCXX_TARGETING_MSVC, since it targets the Itanium ABI, whereas MSVC uses the Microsoft ABI. Make the default ABI be vcruntime when targeting MSVC even if libc++abi is present in the tree. Differential Revision: https://reviews.llvm.org/D32320 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300921 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20Disable the filesystem library on Windows by defaultEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300820 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-16[CMake][libcxx] Fix the --target and --gcc-toolchain flag handlingPetr Hosek
CMake has the problem with the single dash variant because of the space, so use the double dash with equal sign version. We also don't have to pass the target triple when checking for compiler-rt since that flag is already included in compile flags now. Differential Revision: https://reviews.llvm.org/D32068 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300409 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13[libc++] Explicitly set output directory for DLLShoaib Meenai
DLLs on Windows are treated as runtime targets. Explicitly set the output directory for them, to be consistent with other platforms. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300206 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-03suppress GCC warning about noexcept functions changing manglingEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299385 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25[libc++] Fix some comment typosShoaib Meenai
Remove a stray letter, add a missing letter. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298766 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25[libc++] Fix word transposition in commentShoaib Meenai
"to due" -> "due to". No functional change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25[libc++] Fix capitalization in commentShoaib Meenai
Fix a stray capital letter in the middle of a sentence. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298763 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25[libc++] Update package versionShoaib Meenai
Make it consistent with the rest of LLVM. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298762 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11Change test coverage generation to use llvm-cov instead of gcov.Eric Fiselier
Clang doesn't produce gcov compatible coverage files. This causes lcov to break because it uses gcov by default. This patch switches lcov to use llvm-cov as the gcov-tool. Unfortunatly llvm-cov doesn't provide a gcov like interface by default so it won't work with lcov. However `llvm-cov gcov` does. For this reason we generate 'llvm-cov-wrapper' script that always passes the gcov flag. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297553 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02Work around GCC linking errors within libc++abi due to missing new/delete ↵Eric Fiselier
definitions git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296822 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02[libc++] Add option to disable new/delete overloads when libc++abi provides ↵Eric Fiselier
them. Summary: Currently both libc++ and libc++abi provide definitions for operator new/delete. However I believe this is incorrect and that one or the other should offer them. This patch adds the CMake option `-DLIBCXX_ENABLE_NEW_DELETE_DEFINITIONS` which defaults no `ON` unless `-DLIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS=ON` is specified. Reviewers: mclow.lists, mehdi_amini, dexonsmith, danalbert, smeenai, mgorny, rmaprath Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30516 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296802 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01Generate the test configuration even when LIBCXX_INCLUDE_TESTS=OFF.Eric Fiselier
This patch changes the CMake configuration so that it always generates the test/lit.site.cfg file, even when testing is disabled. This allows users to test libc++ without requiring them to have a full LLVM checkout on their machine. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296685 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10Recommit "Split exception.cpp and new.cpp implementation into different ↵Eric Fiselier
files for different runtimes." This recommits r294707 with additional fixes. The main difference is libc++ now correctly builds without any ABI library. exception.cpp is a bloody mess. It's full of confusing #ifdef branches for each different ABI library we support, and it's getting unmaintainable. This patch breaks down exception.cpp into multiple different header files, roughly one per implementation. Additionally it moves the definitions of exceptions in new.cpp into the correct implementation header. This patch also removes an unmaintained libc++abi configuration. This configuration may still be used by Apple internally but there are no other possible users. If it turns out that Apple still uses this configuration internally I will re-add it in a later commit. See http://llvm.org/PR31904. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294730 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10Revert "Split exception.cpp and new.cpp implementation into different files ↵Eric Fiselier
for different runtimes." The compiler-rt CMake configuration needs some tweaking before this can land. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294727 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10Correctly default to using the system libc++abi on Apple.Eric Fiselier
This patch fixes a regression where libc++ didn't correctly select the system libc++abi when no in-tree version was found. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294712 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10Split exception.cpp and new.cpp implementation into different files for ↵Eric Fiselier
different runtimes. exception.cpp is a bloody mess. It's full of confusing #ifdef branches for each different ABI library we support, and it's getting unmaintainable. This patch breaks down exception.cpp into multiple different header files, roughly one per implementation. Additionally it moves the definitions of exceptions in new.cpp into the correct implementation header. This patch also removes an unmaintained libc++abi configuration. This configuration may still be used by Apple internally but there are no other possible users. If it turns out that Apple still uses this configuration internally I will re-add it in a later commit. See http://llvm.org/PR31904. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294707 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09[libcxx][CMake] Support in-tree libunwind when building as part of runtimesPetr Hosek
When building as part of runtimes, there is no predefined order in which the runtimes are loaded, so the targets from other projects might not be available. We need to rely on HAVE_<name> variables instead in that case. Differential Revision: https://reviews.llvm.org/D29575 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294553 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05Remove CMake hackEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294116 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04Recommit [libcxx] Never use <cassert> within libc++Eric Fiselier
It is my opinion that libc++ should never use `<cassert>`, including in the `dylib`. This patch remove all uses of `assert` from within libc++ and replaces most of them with `_LIBCPP_ASSERT` instead. Additionally this patch turn `LIBCXX_ENABLE_ASSERTIONS` off by default, because the standard library should not be aborting user programs unless explicitly asked to. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294107 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24Revert "[libcxx] Never use <cassert> within libc++"Eric Fiselier
This reverts commit r292883. Unfortunately <string_view> uses _LIBCPP_ASSERT in a way which is not compatible with the C++11 dylib build. I'll investigate more tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292923 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24[libcxx] Never use <cassert> within libc++Eric Fiselier
Summary: It is my opinion that libc++ should never use `<cassert>`, including in the `dylib`. This patch remove all uses of `assert` from within libc++ and replaces most of them with `_LIBCPP_ASSERT` instead. Additionally this patch turn `LIBCXX_ENABLE_ASSERTIONS` off by default, because the standard library should not be aborting user programs unless explicitly asked to. Reviewers: mclow.lists, compnerd, smeenai Reviewed By: mclow.lists Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D29063 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292883 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17Don't strip -m32 from the user provide command line flags. This fixes the ↵Eric Fiselier
compiler-rt 32 bit sanitizer build git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292291 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16Improve CMake and LIT support for WindowsEric Fiselier
This patch contains multiple cleanups and fixes to better support building on Windows. * [Test] Fix handling of library runtime search paths by correctly adding them to the PATH variable when running the tests. * [Test] Don't explicitly force "--target=i686-pc-windows" when running the test suite. Clang++ seems to deduce the correct target. * [Test] Fix `.sh.cpp` tests on Windows by properly escaping flags used in shell commands. Specifically windows style paths which included spaces were causing these tests to fail. * [CMake] Add "vcruntime" to the list of supported C++ ABI libraries in CMake, and teach the test suite how to handle it. For now libc++ defaults to using "vcruntime" on Windows except when libc++abi is in tree; That is probably a bug and should be changed to always use vcruntime, at least for now. * [Misc] Move the "c++-build" include directory to the libc++ binary dir instead of the top level project dir and rename it "c++build". This is just misc cleanup. Libc++ shouldn't be creating internal build files and directories at the top-level projects root. * [Misc] Build type_info's destructor when building for MSVC. This is a temporary work around to prevent link errors until we have a proper type_info implementation. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292157 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16Reland "[CMake][libcxx] Check that we have libcxxabi before using it"Petr Hosek
This relands commit r291726. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292086 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16Reland "[CMake][libcxx] Do not rely on the existence of c++abi or unwind ↵Petr Hosek
targets" This relands commit r291727. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292085 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16Reland "[CMake][libcxx] Move Python check to main CMake file"Petr Hosek
This relands commit r291728. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292084 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14[libc++][CMake] Use debug MSVC runtimes when libc++ is built in debug modeEric Fiselier
Summary: This patch allows libc++ to be built against the debug MSVC runtimes instead of just the release ones. Reviewers: rnk, majnemer, compnerd, smeenai Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D28725 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292006 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14[libc++] [CMake] Link with /nodefaultlibs on WindowsEric Fiselier
Summary: This patch attempts to fix the libc++ build/link so that it doesn't use an default C++ libraries on Windows. This is needed to prevent linking to MSVC's STL library. Additionally this patch changes libc++ so that it is always linked with the non-debug DLL's (e.g. `/MD`). This is needed so that the test suite can correctly link the same libraries without needing to know which configuration `c++.dll` was linked with. Reviewers: compnerd, rnk, majnemer, kimgr, awson, halyavin, smeenai Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28441 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11Revert "[CMake][libcxx] Move Python check to main CMake file"Petr Hosek
This reverts commit 39441fe9f00a58ffc2fdff92a4b0e8a280a5f444. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291728 91177308-0d34-0410-b5e6-96231b3b80d8