Skip to content

W-23475825 build(native-lib): strip debug symbols and add libdwlib symlink#125

Merged
mlischetti merged 1 commit into
masterfrom
fix/native-lib-strip-and-symlink
Jul 16, 2026
Merged

W-23475825 build(native-lib): strip debug symbols and add libdwlib symlink#125
mlischetti merged 1 commit into
masterfrom
fix/native-lib-strip-and-symlink

Conversation

@mlischetti

Copy link
Copy Markdown
Contributor

Extracted from #119 (feat/new-native-bindings) as an independent build improvement to the shared native library (dwlib) consumed by the existing Python and Node bindings.

Changes (native-lib/build.gradle)

  • stripNativeLibrary: strip debug symbols from dwlib after nativeCompile to reduce artifact size (strip -S on macOS, --strip-debug on Linux, best-effort on Windows). Skippable with -PskipStripDebug=true for
    local debugging.
  • libdwlib symlink: on Linux/macOS, create a libdwlib.{so,dylib} symlink so consumers can link with the standard -ldwlib flag.
  • stagePythonNativeLib and stageNodeNativeLib now depend on stripNativeLibrary, so both existing bindings package the stripped library.

Notes

…mlink

Two build improvements to the shared native library (dwlib) consumed by the
existing Python and Node bindings, extracted from the native-bindings branch
as an independent change:

- stripNativeLibrary: strip debug symbols from dwlib after nativeCompile to
  reduce artifact size (strip -S on macOS, --strip-debug on Linux, best-effort
  on Windows). Skippable with -PskipStripDebug=true for local debugging.
- On Linux/macOS, create a libdwlib.{so,dylib} symlink so consumers can link
  with the standard -ldwlib flag.

The stagePythonNativeLib and stageNodeNativeLib tasks now depend on
stripNativeLibrary so both existing bindings package the stripped library.

Verified with a real GraalVM native build: nativeCompile -> stripNativeLibrary
("Stripped debug symbols") -> stagePythonNativeLib succeeds, libdwlib.dylib
symlink is created, and the stripped lib is staged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mlischetti
mlischetti requested a review from a team as a code owner July 16, 2026 14:56
@mlischetti
mlischetti merged commit 14b01e1 into master Jul 16, 2026
3 checks passed
@mlischetti
mlischetti deleted the fix/native-lib-strip-and-symlink branch July 16, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants