Skip to content
  1. Sep 15, 2020
    • Louis Dionne's avatar
      [libc++] Allow building without threads in standalone builds · da104444
      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
      da104444
  2. Jul 23, 2020
    • Logan Smith's avatar
      Reapply "Try enabling -Wsuggest-override again, using add_compile_options... · 77e0e9e1
      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.
      77e0e9e1
    • Logan Smith's avatar
      Revert "Try enabling -Wsuggest-override again, using add_compile_options... · 97a0f80c
      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.
      97a0f80c
  3. Jul 22, 2020
  4. Jul 20, 2020
    • Logan Smith's avatar
      Enable -Wsuggest-override in the LLVM build · 8b16e45f
      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
      8b16e45f
  5. Jul 16, 2020
  6. Jul 09, 2020
    • Louis Dionne's avatar
      [runtimes] Allow passing Lit parameters through CMake · 6f69318c
      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.
      6f69318c
  7. Jul 03, 2020
    • Louis Dionne's avatar
      [libc++/libc++abi] Automatically detect whether exceptions are enabled · 71d88ceb
      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.
      71d88ceb
  8. Jun 25, 2020
  9. Jun 15, 2020
  10. Jun 11, 2020
  11. Apr 22, 2020
    • Louis Dionne's avatar
      [libc++/abi] Provide an option to turn on forgiving dynamic_cast when building libc++abi · e5291c4a
      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.
      e5291c4a
  12. Apr 02, 2020
  13. Mar 30, 2020
    • Louis Dionne's avatar
      Enforce that libc++ and libc++abi are built in a monorepo layout · 19aec8c9
      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
      19aec8c9
  14. Mar 12, 2020
  15. Jan 30, 2020
  16. Jan 09, 2020
  17. Dec 02, 2019
  18. Nov 12, 2019
  19. Oct 07, 2019
  20. Jul 12, 2019
  21. May 30, 2019
    • Petr Hosek's avatar
      [runtimes] Check if pragma comment(lib, ...) is supported first · 789b7f08
      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
      789b7f08
  22. May 22, 2019
    • Petr Hosek's avatar
      [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++ · 81f433b4
      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
      81f433b4
  23. May 02, 2019
    • Petr Hosek's avatar
      [gn] Support for building libcxxabi · 4fe63c70
      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
      4fe63c70
  24. Apr 03, 2019
  25. Mar 08, 2019
  26. Feb 17, 2019
    • Jonas Hahnfeld's avatar
      [compiler-rt] Build custom libcxx with libcxxabi · 66c60d9d
      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
      66c60d9d
  27. Feb 12, 2019
    • Petr Hosek's avatar
      [CMake] Avoid passing -rtlib=compiler-rt when using compiler-rt · 5300d841
      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
      5300d841
  28. Feb 04, 2019
    • Petr Hosek's avatar
      [CMake] Support CMake variables for setting target, sysroot and toolchain · 6fd4e7fe
      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
      6fd4e7fe
  29. Jan 24, 2019
    • Petr Hosek's avatar
      [libcxxabi] Support building hermetic static library · 8807db32
      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
      8807db32
  30. Jan 16, 2019
  31. Aug 01, 2018
  32. Jul 26, 2018
    • Sam Clegg's avatar
      [CMake] Don't use LIBCXXABI_ENABLE_STATIC option before its declared · 77c99ee5
      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
      77c99ee5
  33. Jul 25, 2018
  34. Jul 24, 2018
  35. Jul 23, 2018
Loading