From 2fcf53ec97415e1fad1ad5ab80ace37bb8aab7c4 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 22 Apr 2026 15:34:24 -0700 Subject: [PATCH] fix: add missing SanitizeLeak.cpp to RCT-Folly podspec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Folly `SanitizeLeak.cpp` file provides implementations for `annotate_object_leaked_impl`, `annotate_object_collected_impl`, and `annotate_object_count_leaked_uncollected_impl`. These symbols are declared in `SanitizeLeak.h` and referenced by `small_vector.h`, but the .cpp was not listed in the podspec's source_files. With static libraries this is benign — the linker skips unreferenced symbols. With `USE_FRAMEWORKS=dynamic` the linker must resolve every symbol, causing an "undefined symbols for architecture x86_64" error. Co-Authored-By: Claude Opus 4.6 --- packages/react-native/third-party-podspecs/RCT-Folly.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/third-party-podspecs/RCT-Folly.podspec b/packages/react-native/third-party-podspecs/RCT-Folly.podspec index 8852179b6ce2..0b9388d6a7aa 100644 --- a/packages/react-native/third-party-podspecs/RCT-Folly.podspec +++ b/packages/react-native/third-party-podspecs/RCT-Folly.podspec @@ -49,6 +49,7 @@ Pod::Spec.new do |spec| 'folly/lang/CString.cpp', 'folly/lang/Exception.cpp', 'folly/memory/ReentrantAllocator.cpp', + 'folly/memory/SanitizeLeak.cpp', 'folly/memory/detail/MallocImpl.cpp', 'folly/net/NetOps.cpp', 'folly/portability/SysUio.cpp',