[PATCH] D152058: [CMake] Disable exceptions in cpp-httplib
Aiden Grossman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 3 03:03:37 PDT 2023
aidengrossman created this revision.
Herald added subscribers: ekilmer, hiraditya.
Herald added a project: All.
aidengrossman requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch disables exceptions in cpp-httplib which are turned on by
default and only disabled through the use of a preprocessor macro.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152058
Files:
llvm/lib/Debuginfod/CMakeLists.txt
Index: llvm/lib/Debuginfod/CMakeLists.txt
===================================================================
--- llvm/lib/Debuginfod/CMakeLists.txt
+++ llvm/lib/Debuginfod/CMakeLists.txt
@@ -13,6 +13,13 @@
set(imported_libs ${imported_libs} ${LLVM_PTHREAD_LIB})
endif()
+# cpp-httplib by default builds with exceptions unless they are disabled using
+# a preprocessor macro.
+if (LLVM_ENABLE_HTTPLIB)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCPPHTTPLIB_NO_EXCEPTIONS")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCPPHTTPLIB_NO_EXCEPTIONS")
+endif()
+
# Note: This isn't a component, since that could potentially add a libcurl
# dependency to libLLVM.
add_llvm_library(LLVMDebuginfod
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152058.528085.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230603/13e81855/attachment.bin>
More information about the llvm-commits
mailing list