[all-commits] [llvm/llvm-project] 71d88c: [libc++/libc++abi] Automatically detect whether ex...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Jul 3 11:58:29 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 71d88cebfb42c8c5ac2d54b42afdcca956e55660
      https://github.com/llvm/llvm-project/commit/71d88cebfb42c8c5ac2d54b42afdcca956e55660
  Author: Louis Dionne <ldionne at apple.com>
  Date:   2020-07-03 (Fri, 03 Jul 2020)

  Changed paths:
    M libcxx/CMakeLists.txt
    M libcxx/include/__config
    M libcxx/test/libcxx/strings/iterators.noexcept.pass.cpp
    M libcxxabi/CMakeLists.txt
    M libcxxabi/include/__cxxabi_config.h
    M llvm/utils/gn/secondary/libcxx/src/BUILD.gn

  Log Message:
  -----------
  [libc++/libc++abi] Automatically detect whether exceptions are enabled

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.




More information about the All-commits mailing list