- Sep 15, 2020
-
-
Louis Dionne authored
Setting _LIBCPP_HAS_NO_THREADS is needed when building libcxxabi without threads in standalone mode. This is useful when target WASM. Otherwise, you get an error like "No thread API" when building libcxxabi. It would be better to link against a properly-configured libc++ headers CMake target when building libc++abi instead, but we don't generate such targets yet. Thanks to Matthew Bauer for the patch. Differential Revision: https://reviews.llvm.org/D60743
-
- Jul 23, 2020
-
-
Logan Smith authored
Reapply "Try enabling -Wsuggest-override again, using add_compile_options instead of add_compile_definitions for disabling it in unittests/ directories." add_compile_options is more sensitive to its location in the file than add_definitions--it only takes effect for sources that are added after it. This updated patch ensures that the add_compile_options is done before adding any source files that depend on it. Using add_definitions caused the flag to be passed to rc.exe on Windows and thus broke Windows builds.
-
Logan Smith authored
Revert "Try enabling -Wsuggest-override again, using add_compile_options instead of add_compile_definitions for disabling it in unittests/ directories." This reverts commit 388c9fb1.
-
- Jul 22, 2020
-
-
Logan Smith authored
Try enabling -Wsuggest-override again, using add_compile_options instead of add_compile_definitions for disabling it in unittests/ directories. Using add_compile_definitions caused the flag to be passed to rc.exe on Windows and thus broke Windows builds.
-
Louis Dionne authored
This upgrade should be friction-less because we've already been ensuring that CMake >= 3.13.4 is used. This is part of the effort discussed on llvm-dev here: http://lists.llvm.org/pipermail/llvm-dev/2020-April/140578.html Differential Revision: https://reviews.llvm.org/D78648
-
Hans Wennborg authored
After lots of follow-up fixes, there are still problems, such as -Wno-suggest-override getting passed to the Windows Resource Compiler because it was added with add_definitions in the CMake file. Rather than piling on another fix, let's revert so this can be re-landed when there's a proper fix. This reverts commit 21c0b4c1. This reverts commit 81d68ad2. This reverts commit a361aa52. This reverts commit fa42b7cf. This reverts commit 955f87f9. This reverts commit 8b16e45f. This reverts commit 308a127a. This reverts commit 274b6b0c. This reverts commit 1c7037a2.
-
- Jul 20, 2020
-
-
Logan Smith authored
This patch adds Clang's new (and GCC's old) -Wsuggest-override to the warning flags for the LLVM build. The warning is a stronger form of -Winconsistent-missing-override which warns _everywhere_ that override is missing, not just in places where it's inconsistent within a class. Some directories in the monorepo need the warning disabled for compatibility's, or sanity's, sake; in particular, libcxx/libcxxabi, and any code implementing or interoperating with googletest, googlemock, or google benchmark (which do not themselves use override). This patch adds -Wno-suggest-override to the relevant CMakeLists.txt's to accomplish this. Differential Revision: https://reviews.llvm.org/D84126
-
- Jul 16, 2020
-
-
Louis Dionne authored
-
- Jul 09, 2020
-
-
Louis Dionne authored
This allows passing parameters to the test suites without using LLVM_LIT_ARGS. The problem is that we sometimes want to set some Lit arguments on the CMake command line, but the Lit parameters in a CMake cache file. If the only knob to do that is LLVM_LIT_ARGS, the command-line entry overrides the cache one, and the parameters set by the cache are ignored. This fixes a current issue with the build bots that they completely ignore the 'std' param set by Lit, because other Lit arguments are provided via LLVM_LIT_ARGS on the CMake command-line.
-
- Jul 03, 2020
-
-
Louis Dionne authored
Instead of detecting it automatically (in libc++) and relying on _LIBCXXABI_NO_EXCEPTIONS being set explicitly (in libc++abi), always detect whether exceptions are enabled automatically. This commit also removes support for specifying -D_LIBCPP_NO_EXCEPTIONS and -D_LIBCXXABI_NO_EXCEPTIONS explicitly -- those should just be inferred from using -fno-exceptions (or an equivalent flag). Allowing both -D_FOO_NO_EXCEPTIONS to be provided explicitly and trying to detect it automatically is just confusing, especially since we did specify it explicitly when building libc++abi. We should have only one way to detect whether exceptions are enabled, but it should be robust.
-
- Jun 25, 2020
-
-
Louis Dionne authored
This is the libc++abi counterpart of 0c66af97.
-
- Jun 15, 2020
-
-
Louis Dionne authored
This is necessary for standalone builds where the libc++ in use has a custom configuration set up inside __config_site -- one needs to build libc++abi against the installed headers of libc++ (which are properly configured) instead of the ones inside libcxx/include. See https://reviews.llvm.org/rGe619e9d#927848 for details.
-
- Jun 11, 2020
-
-
Louis Dionne authored
Since we have the monorepo, libc++abi's build requires a sibling checkout of the libc++ sources. Hence, the logic for finding libc++ can be greatly simplified.
-
- Apr 22, 2020
-
-
Louis Dionne authored
Instead of the ad-hoc #define _LIBCXX_DYNAMIC_FALLBACK, provide an option to enable the setting when building libc++abi. Also use the occasion to rename the option to something slightly more descriptive. Note that in the future, it would be great to simply remove this option altogether. However, in the meantime, it seems better to have it be an official option than something ad-hoc.
-
- Apr 02, 2020
-
-
Louis Dionne authored
To avoid wasting the valuable time of contributors, add a link to a blocked review to document additional issues with the removal of some GCC 4.9 workaround.
-
- Mar 30, 2020
-
-
Louis Dionne authored
We will soon start removing technical debt and sharing code between the two directories, so this first step is meant to discover potential places where the libraries are built outside of a monorepo layout. I imagine this could happen as a remnant of the pre-monorepo setup. This was discussed on the libcxx-dev mailing list and we got overall consensus on the direction. All consumers of libc++ and libc++abi should already be doing so through the monorepo, however it is possible that we catch some stragglers with this patch, in which case it may need to be reverted temporarily. Differential Revision: https://reviews.llvm.org/D76102
-
- Mar 12, 2020
-
-
Sergej Jaskiewicz authored
[libcxxabi] Set LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX to ON if LIBCXX_ENABLE_SHARED is not defined Differential Revision: https://reviews.llvm.org/D71894
-
- Jan 30, 2020
-
-
Alex Langford authored
-
- Jan 09, 2020
-
-
Sergej Jaskiewicz authored
Summary: Right now the only way to force libc++abi tests to link with the static version of libc++abi is to set `LIBCXXABI_ENABLE_SHARED` to `OFF`. However, this doesn't work when libc++abi is built as standalone project because of [this](https://github.com/llvm/llvm-project/blob/54c522420347e58aa7bae1892cf5c5672b57c875/libcxxabi/CMakeLists.txt#L503-L519). This change allows specifying the version of the library for tests to link with. This is useful for remote testing, for example, with `SSHExecutor`, where we _have_ to link with libc++abi statically. Two new CMake options are introduced here: `LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI` and `LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX`. They can be set to `OFF` to tell the test utility to link tests with the static libraries. It shouldn't break anything, because the default values of these options are set such that the test utility will behave the same way. Reviewers: EricWF, mclow.lists, phosek, mehdi_amini, ldionne, jroelofs, bcraig Subscribers: mgorny, christof, ldionne, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D71894
-
- Dec 02, 2019
-
-
Michał Górny authored
This is a followup to 35bc5276. It fixes the dependent libs usage in libcxx and libcxxabi to link pthread and rt libraries only if CMake detects them, rather than based on explicit platform blacklist. Differential Revision: https://reviews.llvm.org/D70888
-
- Nov 12, 2019
-
-
Sam Clegg authored
We build with `-nostdinc++` and add our own header path via `LIBCXXABI_LIBCXX_INCLUDES`. However cmake tried to be clever and if `LIBCXXABI_LIBCXX_INCLUDES` happens to match the compilers system path it will remove the `-I` flag meaning we can't access any C++ headers. Ideally cmake would be able see that we are using `-nostdinc++` and disable this behaviour. Differential Revision: https://reviews.llvm.org/D69973
-
- Oct 07, 2019
-
-
Louis Dionne authored
That option controls the 'VERSION' attribute of the libc++abi shared library, which in turn controls the name of the actual dylib being produced. llvm-svn: 373949
-
- Jul 12, 2019
-
-
Petr Hosek authored
When exceptions are disabled, avoid their processing altogether. This avoids pulling in the depenency on demangler significantly reducing binary size when statically linking against libc++abi built without exception support. Differential Revision: https://reviews.llvm.org/D64191 llvm-svn: 365944
-
- May 30, 2019
-
-
Petr Hosek authored
This fixes the issue introduced by r362048 where we always use pragma comment(lib, ...) for dependent libraries when the compiler is Clang, but older Clang versions don't support this pragma so we need to check first if it's supported before using it. llvm-svn: 362055
-
- May 22, 2019
-
-
Petr Hosek authored
This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/$target/c++ and include/c++ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59168 llvm-svn: 361432
-
- May 02, 2019
-
-
Petr Hosek authored
This change introduces support for building libcxxabi. The library build should be complete, but not all CMake options have been replicated in GN. We also don't support tests yet. We only support two stage build at the moment. Differential Revision: https://reviews.llvm.org/D60372 llvm-svn: 359805
-
- Apr 03, 2019
-
-
Sam Clegg authored
This is on by default, since on many platforms and configurations libc++abi.a gets statically linked into shared libraries and/or PIE executables. This change is a followup to https://reviews.llvm.org/D60005 which allows us to default to PIC code, but disable this if needed (for example on WebAssembly where PIC code its currently compatible with static linking). Differential Revision: https://reviews.llvm.org/D60049 llvm-svn: 357551
-
- Mar 08, 2019
-
-
Matthew Voss authored
This broke the windows bots. This reverts commit 28302c66. llvm-svn: 355725
-
Petr Hosek authored
This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/<target> and include/ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59013 llvm-svn: 355665
-
- Feb 17, 2019
-
-
Jonas Hahnfeld authored
This changes add_custom_libcxx to also build libcxxabi and merges the two into a static and hermetic library. There are multiple advantages: 1) The resulting libFuzzer doesn't expose C++ internals and looks like a plain C library. 2) We don't have to manually link in libstdc++ to provide cxxabi. 3) The sanitizer tests cannot interfere with an installed version of libc++.so in LD_LIBRARY_PATH. Differential Revision: https://reviews.llvm.org/D58013 llvm-svn: 354212
-
- Feb 12, 2019
-
-
Petr Hosek authored
We build libc++ and libc++abi with -nodefaultlibs, so -rtlib=compiler-rt has no effect and results in an 'argument unused during compilation' warning which breaks the build when using -Werror. We can therefore drop -rtlib=compiler-rt without any functional change; note that the actual compiler-rt linking is handled by HandleCompilerRT. Differential Revision: https://reviews.llvm.org/D58084 llvm-svn: 353786
-
- Feb 04, 2019
-
-
Petr Hosek authored
CMake has a standard way of setting target triple, sysroot and external toolchain through CMAKE_<LANG>_COMPILER_TARGET, CMAKE_SYSROOT and CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN. These are turned into corresponding --target=, --sysroot= and --gcc-toolchain= variables add included appended to CMAKE_<LANG>_FLAGS. libunwind, libc++abi, libc++ provides their own mechanism through <PROJECT>_TARGET_TRIPLE, <PROJECT>_SYSROOT and <PROJECT>_GCC_TOOLCHAIN variables. These are also passed to lit via lit.site.cfg, and lit config uses these to set the corresponding compiler flags when building tessts. This means that there are two different ways of setting target, sysroot and toolchain, but only one is properly supported in lit. This change extends CMake build for libunwind, libc++abi and libc++ to also support the CMake variables in addition to project specific ones in lit. Differential Revision: https://reviews.llvm.org/D57670 llvm-svn: 353084
-
- Jan 24, 2019
-
-
Petr Hosek authored
This is useful when the static libc++abi library is being linked into shared libraries that may be used in with other shared libraries that use different C++ library. We want to avoid avoid exporting libc++abi or libc++ symbols in those cases. This achieved by a new CMake option which can be enabled by libc++abi vendors as needed. Differential Revision: https://reviews.llvm.org/D56026 llvm-svn: 352017
-
- Jan 16, 2019
-
-
Hans Wennborg authored
llvm-svn: 351341
-
- Aug 01, 2018
-
-
Hans Wennborg authored
llvm-svn: 338564
-
- Jul 26, 2018
-
-
Sam Clegg authored
Summary: rL337867 introduced two new cmake_dependent_option options: - LIBCXXABI_INSTALL_STATIC_LIBRARY - LIBCXXABI_INSTALL_SHARED_LIBRARY They depend on LIBCXXABI_ENABLE_STATIC and LIBCXXABI_ENABLE_SHARED and so therefore need to (it seems) come after the declaration of these two options. Subscribers: mgorny, aheejin, christof, ldionne, cfe-commits Differential Revision: https://reviews.llvm.org/D49825 llvm-svn: 337982
-
- Jul 25, 2018
-
-
Petr Hosek authored
This was changed unintentionally in r335809. Differential Revision: https://reviews.llvm.org/D49765 llvm-svn: 337937
-
Petr Hosek authored
Currently it's only possible to control whether shared or static library build of libc++, libc++abi and libunwind is enabled or disabled and whether to install everything we've built or not. However, it'd be useful to have more fine grained control, e.g. when static libraries are merged together into libc++.a we don't need to install libc++abi.a and libunwind.a. This change adds this option. Differential Revision: https://reviews.llvm.org/D49573 llvm-svn: 337867
-
- Jul 24, 2018
-
-
Petr Hosek authored
This is a reland of commit r337668. llvm-svn: 337814
-
- Jul 23, 2018
-
-
Petr Hosek authored
This reverts commit r337668: broke the cxxabi build when using Make. llvm-svn: 337670
-