[PATCH] D111238: [Support][llvm] Add optional libCURL dependency to llvm build configuration
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 13 10:58:49 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2de43d4202a3: [CMake] Add optional libCURL dependency to llvm build configuration (authored by noajshu, committed by phosek).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111238/new/
https://reviews.llvm.org/D111238
Files:
llvm/cmake/config-ix.cmake
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -159,6 +159,27 @@
set(LLVM_ENABLE_LIBXML2 "${HAVE_LIBXML2}")
endif()
+if(LLVM_ENABLE_CURL)
+ if(LLVM_ENABLE_CURL STREQUAL FORCE_ON)
+ find_package(CURL REQUIRED)
+ else()
+ find_package(CURL)
+ endif()
+ if(CURL_FOUND)
+ # Check if curl we found is usable; for example, we may have found a 32-bit
+ # library on a 64-bit system which would result in a link-time failure.
+ cmake_push_check_state()
+ list(APPEND CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARY})
+ check_symbol_exists(curl_easy_init curl/curl.h HAVE_CURL)
+ cmake_pop_check_state()
+ if(LLVM_ENABLE_CURL STREQUAL FORCE_ON AND NOT HAVE_CURL)
+ message(FATAL_ERROR "Failed to configure curl")
+ endif()
+ endif()
+ set(LLVM_ENABLE_CURL "${HAVE_CURL}")
+endif()
+
# Don't look for these libraries if we're using MSan, since uninstrumented third
# party code may call MSan interceptors like strlen, leading to false positives.
if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111238.379469.patch
Type: text/x-patch
Size: 1207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211013/5f8d1115/attachment.bin>
More information about the llvm-commits
mailing list