Skip to content

Conversation

@kraenhansen
Copy link
Collaborator

Merging this PR will:

  • Introduce the "RelWithDebInfo" and "MinSizeRel" configurations to cmake-rn.
  • Locate and include debug symbols when creating an Xcframework.
  • Start building the examples with "RelWithDebInfo".
  • Rebuild any dSYM directory when linking frameworks.

@kraenhansen kraenhansen self-assigned this Oct 23, 2025
@kraenhansen kraenhansen added enhancement New feature or request Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.) labels Oct 23, 2025
@kraenhansen kraenhansen requested a review from Copilot October 23, 2025 12:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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) {

@kraenhansen kraenhansen changed the title Support Apple debug symbols when building and linking Enable "RelWithDebInfo" and "MinSizeRel" configurations and support Apple debug symbols when building and linking Oct 23, 2025
@kraenhansen kraenhansen added the Android 🤖 Anything related to the Android platform (Gradle, NDK, Android SDK) label Oct 23, 2025
@kraenhansen kraenhansen force-pushed the kh/apple-debug-symbols branch from 0a4aa3b to e9c145b Compare October 23, 2025 16:27
@kraenhansen kraenhansen merged commit 5c3de89 into main Oct 23, 2025
6 checks passed
@kraenhansen kraenhansen deleted the kh/apple-debug-symbols branch October 23, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android 🤖 Anything related to the Android platform (Gradle, NDK, Android SDK) Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.) enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant