W-23475825 build(native-lib): strip debug symbols and add libdwlib symlink#125
Merged
Merged
Conversation
…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>
martincousido
approved these changes
Jul 16, 2026
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.
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 fromdwlibafternativeCompileto reduce artifact size (strip -Son macOS,--strip-debugon Linux, best-effort on Windows). Skippable with-PskipStripDebug=trueforlocal debugging.
libdwlibsymlink: on Linux/macOS, create alibdwlib.{so,dylib}symlink so consumers can link with the standard-ldwlibflag.stagePythonNativeLibandstageNodeNativeLibnow depend onstripNativeLibrary, so both existing bindings package the stripped library.Notes
Branches off
master; contains only the strip + symlink changes — none of the new Go/Rust/C test or packaging tasks from Native-bindings #119.Verified with a real GraalVM native build:
nativeCompile → stripNativeLibrary("✓ Stripped debug symbols")→ stagePythonNativeLibsucceeds;libdwlib.dylibsymlink created; stripped lib staged.Compare links to open them: