fix: add missing SanitizeLeak.cpp to RCT-Folly podspec#2943
Draft
Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Draft
fix: add missing SanitizeLeak.cpp to RCT-Folly podspec#2943Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Conversation
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
folly/memory/SanitizeLeak.cppto theRCT-Folly.podspecsource_files listThe file exists in the Folly source tree (fetched by CocoaPods from the Folly repo) but was never compiled because it wasn't listed in the podspec. It provides implementations for
annotate_object_leaked_impl,annotate_object_collected_impl, andannotate_object_count_leaked_uncollected_impl— symbols declared inSanitizeLeak.hand referenced fromsmall_vector.h.With static libraries this is benign (linker skips unreferenced symbols), but with
USE_FRAMEWORKS=dynamicthe linker must resolve every symbol, causing:This is also an upstream bug (facebook/react-native) — their
test_ios_rntester_dynamic_frameworksjob is markedcontinue-on-error: truefor this same reason.Test plan
USE_FRAMEWORKS=dynamicon iOS simulator (previously failed at link time)🤖 Generated with Claude Code