This is an automated email from the ASF dual-hosted git repository. szaszm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 1e18ec4a1403b841a09ac9b5856b3b6d976b8839 Author: Gabor Gyimesi <[email protected]> AuthorDate: Sat Dec 7 15:17:10 2024 +0100 MINIFICPP-2496 fix: Remove debug symbols from Couchbase extension lib Couchbase builds with -ggdb3 compiler flag by default if backtrace symbol is found on the system. This option is removed to remove the symbols and reduce the library size significantly. Closes #1905 Signed-off-by: Marton Szasz <[email protected]> --- cmake/Couchbase.cmake | 6 ++++-- thirdparty/couchbase/remove-debug-symbols.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cmake/Couchbase.cmake b/cmake/Couchbase.cmake index cf4ff7fb1..74a7e1326 100644 --- a/cmake/Couchbase.cmake +++ b/cmake/Couchbase.cmake @@ -30,10 +30,12 @@ set(COUCHBASE_CXX_CLIENT_BUILD_TOOLS OFF CACHE BOOL "" FORCE) set(COUCHBASE_CXX_CLIENT_POST_LINKED_OPENSSL ON CACHE BOOL "" FORCE) set(COUCHBASE_CXX_CLIENT_INSTALL OFF CACHE BOOL "" FORCE) -set(PATCH_FILE "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/remove-thirdparty.patch") +set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/remove-thirdparty.patch") +set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/remove-debug-symbols.patch") set(PC ${Bash_EXECUTABLE} -c "set -x &&\ - (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE}\\\")") + (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\ + (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\")") FetchContent_Declare(couchbase-cxx-client URL https://github.com/couchbase/couchbase-cxx-client/releases/download/1.0.2/couchbase-cxx-client-1.0.2.tar.gz diff --git a/thirdparty/couchbase/remove-debug-symbols.patch b/thirdparty/couchbase/remove-debug-symbols.patch new file mode 100644 index 000000000..bc7e4052e --- /dev/null +++ b/thirdparty/couchbase/remove-debug-symbols.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6c69b32..497e2f6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,7 +58,6 @@ include(cmake/Sanitizers.cmake) + # allow for static analysis options + include(cmake/StaticAnalyzers.cmake) + +-include(cmake/Backtrace.cmake) + enable_sanitizers(project_options) + + if(COUCHBASE_CXX_CLIENT_MASTER_PROJECT)
