llvm.org GIT mirror llvm / 458830e
[benchmark] Disable exceptions in Microsoft STL This patch disables exceptions in Microsoft STL when exception handling is not enabled in Benchmark project. It fixes Windows builds that were failing due to C4530 warnings thrown by MS STL. Differential Revision: https://reviews.llvm.org/D52998 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346237 91177308-0d34-0410-b5e6-96231b3b80d8 Elizabeth Andrews 9 months ago
2 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
9898 if (NOT BENCHMARK_ENABLE_EXCEPTIONS)
9999 add_cxx_compiler_flag(-EHs-)
100100 add_cxx_compiler_flag(-EHa-)
101 add_definitions(-D_HAS_EXCEPTIONS=0)
101102 endif()
102103 # Link time optimisation
103104 if (BENCHMARK_ENABLE_LTO)
1818 is applied to fix cross compilation with MinGW headers
1919 * https://github.com/google/benchmark/commit/439d6b1c2a6da5cb6adc4c4dfc555af235722396
2020 is applied to fix building with MinGW headers for ARM
21 * https://github.com/google/benchmark/commit/a9b31c51b1ee7ec7b31438c647123c2cbac5d956
22 is applied to disable exceptions in Microsoft STL when exceptions are disabled