Skip to content

Add merge symbol logic for MachO symbols - #1929

Merged
a-maurice merged 4 commits into
mainfrom
am-merge_libraries
Oct 7, 2026
Merged

a-maurice merged 4 commits into
mainfrom
am-merge_libraries

Conversation

@a-maurice

Copy link
Copy Markdown
Contributor

Description

Provide details of the change, and generalize the change in the PR title above.

Check for more special symbols when merging dependency symbols into desktop libraries. Some symbols are prefixed with lowercase l, and should be ignored during this logic.

#1920


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a linker issue on macOS (XCode 27) by ignoring Mach-O assembler temporary labels, compiler metadata labels, and Objective-C runtime metadata during library merging. It introduces an is_ignored_symbol helper in merge_libraries.py to filter out these symbols, updates demangling logic to handle linker-private C++ symbols (l__Z), and adds comprehensive unit tests to verify the new behavior. Additionally, it updates the test shell script to conditionally include demumble if it is executable. The review feedback suggests optimizing the condition check in is_ignored_symbol by swapping the order of checks to evaluate not symbol.startswith("_") first, which allows short-circuiting and avoids unnecessary calls to is_cpp_symbol for the majority of symbols.

Comment thread scripts/merge_libraries.py Outdated
@a-maurice
a-maurice requested a review from AustinBenoit October 6, 2026 20:30
@a-maurice a-maurice added the tests-requested: quick Trigger a quick set of integration tests. label Oct 6, 2026
@github-actions github-actions Bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: quick Trigger a quick set of integration tests. labels Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✅  Integration test succeeded!

Requested by @a-maurice on commit 25bdab4
Last updated: Wed Oct 7 12:19 PDT 2026
View integration test log & download artifacts

@github-actions github-actions Bot added the tests: succeeded This PR's integration tests succeeded. label Oct 6, 2026
@firebase-workflow-trigger firebase-workflow-trigger Bot removed the tests: in-progress This PR's integration tests are in progress. label Oct 6, 2026
@a-maurice
a-maurice merged commit 25bdab4 into main Oct 7, 2026
70 of 71 checks passed
@a-maurice
a-maurice deleted the am-merge_libraries branch October 7, 2026 17:31
@github-actions github-actions Bot added tests: in-progress This PR's integration tests are in progress. tests: succeeded This PR's integration tests succeeded. and removed tests: succeeded This PR's integration tests succeeded. labels Oct 7, 2026
@firebase-workflow-trigger firebase-workflow-trigger Bot removed the tests: in-progress This PR's integration tests are in progress. label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests: succeeded This PR's integration tests succeeded.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants