[libcxx-commits] [PATCH] D103947: [libcxx] Fix using the vcruntime ABI with _HAS_EXCEPTIONS=0 defined
Reid Kleckner via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 9 14:02:11 PDT 2021
rnk added a comment.
I think we can say that `_HAS_EXCEPTIONS=0` is an important configuration. We use it in LLVM, you can grep for it:
$ git grep _HAS_EXCEPTIONS ../llvm
../llvm/cmake/modules/AddLLVM.cmake: list(APPEND LLVM_COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0)
... others
Chromium also uses it, but apparently they already found this problem and worked around it:
https://source.chromium.org/chromium/chromium/src/+/main:build/config/compiler/BUILD.gn;l=1881?q=_HAS_EXCEPTIONS&ss=chromium
# libc++ uses the __has_feature macro to control whether to use exceptions,
# so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
# breaks libc++ because it depends on MSVC headers that only provide certain
# declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
# exceptions, despite being conditional on _HAS_EXCEPTIONS.
I can't speak to or improve the state of libc++ testing, but I think we'd start using this configuration if libc++ supported it. We have plans to work on Windows testing in LLVM, and that might include libc++, but the timeline is early 2022, so I'm not sure we should wait for that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103947/new/
https://reviews.llvm.org/D103947
More information about the libcxx-commits
mailing list