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

Elizabeth Andrews via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 29 15:24:36 PDT 2018


eandrews added a comment.

In https://reviews.llvm.org/D52998#1259602, @lebedev.ri wrote:

> 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`.


@kbobyrev Is this alright with you?


https://reviews.llvm.org/D52998





More information about the cfe-commits mailing list