diff --git a/llvm/lib/Debuginfod/CMakeLists.txt b/llvm/lib/Debuginfod/CMakeLists.txt --- a/llvm/lib/Debuginfod/CMakeLists.txt +++ b/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