Enable "RelWithDebInfo" and "MinSizeRel" configurations and support Apple debug symbols when building and linking#284
Merged
kraenhansen merged 7 commits intomainfrom Oct 23, 2025
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Apple debug symbols (dSYM) when building and linking native addons. The changes enable developers to use RelWithDebInfo and MinSizeRel build configurations, automatically locate and include debug symbols in XCFrameworks, and ensure debug symbols are properly rebuilt when frameworks are renamed during linking.
Key changes:
- Added "RelWithDebInfo" and "MinSizeRel" configuration options to cmake-rn CLI
- Enhanced XCFramework creation to detect and include dSYM files when present
- Implemented dSYM rebuilding logic in framework linking to maintain debug symbols after renaming binaries
- Updated example builds to use RelWithDebInfo configuration by default
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cmake-rn/src/cli.ts | Expanded configuration choices to include RelWithDebInfo and MinSizeRel |
| packages/host/src/node/prebuilds/apple.ts | Added logic to detect and include dSYM files when creating XCFrameworks |
| packages/host/src/node/cli/apple.ts | Enhanced framework linking to rebuild dSYM directories after renaming binaries |
| packages/node-addon-examples/scripts/build-examples.mts | Updated build script to use RelWithDebInfo configuration |
| .changeset/*.md | Added changeset files documenting the changes |
Comments suppressed due to low confidence (1)
packages/host/src/node/cli/apple.ts:198
- The linkVersionedFramework function is missing the debugSymbolsPath parameter handling that was added to linkFlatFramework. Versioned frameworks may also have debug symbols that need to be rebuilt after renaming, so this function should implement similar dSYM rebuilding logic.
export async function linkVersionedFramework({
frameworkPath,
newLibraryName,
}: LinkFrameworkOptions) {
0a4aa3b to
e9c145b
Compare
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.
Merging this PR will:
cmake-rn.