From fb2a3674e021a72b708cb9e6a29a485fd9d03962 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Wed, 29 Jul 2026 07:39:40 +0000 Subject: [PATCH 02/13] cmake: only link c++abi on Apple when the C++ stdlib is libc++ Linking c++abi unconditionally on Apple breaks builds with GCC and libstdc++, where libc++abi is neither needed nor necessarily present. Gate it on the FOLLY_STDLIB_LIBCXX detection result. See https://github.com/facebook/folly/pull/1907 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_013G8CDpEyDCCgV4jaMM9WME --- CMake/folly-deps.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake index 2902d1f77..d8ae8702b 100644 --- a/CMake/folly-deps.cmake +++ b/CMake/folly-deps.cmake @@ -268,7 +268,7 @@ check_cxx_source_compiles(" FOLLY_STDLIB_LIBCPP ) -if (APPLE) +if (APPLE AND FOLLY_STDLIB_LIBCXX) list (APPEND CMAKE_REQUIRED_LIBRARIES c++abi) list (APPEND FOLLY_LINK_LIBRARIES c++abi) endif () -- 2.43.0