vendor : add missing llama_add_compile_flags#19322
Conversation
|
I am not yet 100% sure that this is necessary. The workflows on I think the one that are failing such as https://github.com/ggml-org/llama.cpp/actions/runs/21664340188/job/62455945468?pr=19296 are when the PR is created before the new workflow file and Github Actions gets confused in some way. |
Possibly, though it makes sense to add it here as we are building |
|
Cool, "works", but |
|
Well, this is annoying, not sure how to fix this... |
|
@CISC I was able to reproduce the locally on my M3 and perhaps this will work for x64 as well: diff --git a/vendor/cpp-httplib/CMakeLists.txt b/vendor/cpp-httplib/CMakeLists.txt
index 3d938d9f3..19cad0800 100644
--- a/vendor/cpp-httplib/CMakeLists.txt
+++ b/vendor/cpp-httplib/CMakeLists.txt
@@ -31,6 +31,16 @@ target_compile_definitions(${TARGET} PRIVATE
set(OPENSSL_NO_ASM ON CACHE BOOL "Disable OpenSSL ASM code when building BoringSSL or LibreSSL")
if (LLAMA_BUILD_BORINGSSL)
+
+ if(LLAMA_FATAL_WARNINGS)
+ set(LLAMA_FATAL_WARNINGS_SAVED ${CMAKE_CXX_FLAGS})
+ string(REPLACE "-Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ string(REPLACE "-Werror" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-parameter")
+ endif()
+
set(FIPS OFF CACHE BOOL "Enable FIPS (BoringSSL)")
set(BORINGSSL_GIT "https://boringssl.googlesource.com/boringssl" CACHE STRING "BoringSSL git repository")
@@ -73,6 +83,10 @@ if (LLAMA_BUILD_BORINGSSL)
set(CPPHTTPLIB_OPENSSL_SUPPORT TRUE)
target_link_libraries(${TARGET} PUBLIC ssl crypto)
+ if(LLAMA_FATAL_WARNINGS)
+ set(CMAKE_CXX_FLAGS ${LLAMA_FATAL_WARNINGS_SAVED})
+ endif()
+
elseif (LLAMA_BUILD_LIBRESSL)
set(LIBRESSL_VERSION "4.2.1" CACHE STRING "LibreSSL version")Setting the string replacements to |
Thanks, normally you aren't supposed to fiddle with |
So in theory just adding that should make the build pass? |
|
@danbev Doesn't seem to work. :( |
* add missing llama_add_compile_flags * disable all warnings for ssl, crypto and fipsmodule
Hopefully fixes CIEnsurehttplibandboringssl/libresslare built with sanitizer options, see #19291 (comment)