eandrews updated this revision to Diff 172171.
eandrews added a comment.
@kbobyrev I apologize if I was unclear in the comments. I was asking if the
changes proposed in the comments are alright with you since they would involve
modifying `benchmark/CMakelists.txt` (instead of `llvm/CMakeLists.txt` as
discussed in mailing list). As Zachary mentioned in comments, `_HAS_EXCEPTIONS`
should be set to 0 only when exceptions are disabled. Since exception handling
for benchmarks is handled in `benchmark/CMakeLists.txt`, I think it makes most
sense to add the definition there. I have now uploaded the proposed change for
review.
I am still working with my company to figure out the corporate CLA Google's
benchmark project requires for patch submissions. I can submit the patch
upstream once that is done. If you would prefer to submit the patch upstream
yourself, please feel free to do so.
Sorry again for the confusion!
https://reviews.llvm.org/D52998
Files:
utils/benchmark/CMakeLists.txt
Index: utils/benchmark/CMakeLists.txt
===================================================================
--- utils/benchmark/CMakeLists.txt
+++ utils/benchmark/CMakeLists.txt
@@ -99,6 +99,7 @@
if (NOT BENCHMARK_ENABLE_EXCEPTIONS)
add_cxx_compiler_flag(-EHs-)
add_cxx_compiler_flag(-EHa-)
+ add_definitions(-D_HAS_EXCEPTIONS=0)
endif()
# Link time optimisation
if (BENCHMARK_ENABLE_LTO)
Index: utils/benchmark/CMakeLists.txt
===================================================================
--- utils/benchmark/CMakeLists.txt
+++ utils/benchmark/CMakeLists.txt
@@ -99,6 +99,7 @@
if (NOT BENCHMARK_ENABLE_EXCEPTIONS)
add_cxx_compiler_flag(-EHs-)
add_cxx_compiler_flag(-EHa-)
+ add_definitions(-D_HAS_EXCEPTIONS=0)
endif()
# Link time optimisation
if (BENCHMARK_ENABLE_LTO)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits