[PATCH] D52998: [benchmark] Disable exceptions in Microsoft STL

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 9 15:27:59 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D52998#1258962, @eandrews wrote:

> Yes. I understand. At the moment, exception handling flags are generated based on `BENCHMARK_ENABLE_EXCEPTIONS`  in `utils/benchmark/CMakeLists.txt` .  However, `_HAS_EXCEPTIONS` is not defined based on this (code below). The warnings are a result of this mismatch.
>
>   if (NOT BENCHMARK_ENABLE_EXCEPTIONS)
>       add_cxx_compiler_flag(-EHs-)
>       add_cxx_compiler_flag(-EHa-)
>     endif()
>
>
> I think it makes most sense to add definition for `_HAS_EXCEPTIONS=0 `here as opposed to modifying `llvm/CMakeLists.txt`.


Then i'd recommend/suggest to submit this upstream <https://github.com/google/benchmark> first.

> Please correct me if I'm wrong. I'm not too familiar with CMake. @kbobyrev Please let me know what you think as well since you had suggested `llvm/CMakeLists.txt`.


https://reviews.llvm.org/D52998





More information about the cfe-commits mailing list