Skip to content

Commit bf98583

Browse files
committed
fix: require dwarf info symbols
1 parent ca87b59 commit bf98583

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

bindings/android/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ val validateReleaseNativeLibraries by tasks.registering {
117117
}
118118

119119
val (sectionsExit, sections) = runReadelf(readelf, "-S", lib.absolutePath)
120-
if (sectionsExit != 0 || !Regex("""\.debug_""").containsMatchIn(sections)) {
121-
throw GradleException("Android native library has no full DWARF debug metadata: '${lib.path}'")
120+
if (sectionsExit != 0 || !Regex("""\.debug_info""").containsMatchIn(sections)) {
121+
throw GradleException("Android native library has no .debug_info DWARF metadata: '${lib.path}'")
122122
}
123123

124124
val wideHeaders = runReadelf(readelf, "-W", "-l", lib.absolutePath)

build_android.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ find_readelf() {
107107
}
108108

109109
has_dwarf_debug_metadata() {
110-
"$READELF_BIN" -S "$1" | grep -Eq '\.debug_'
110+
"$READELF_BIN" -S "$1" | grep -Eq '\.debug_info'
111111
}
112112

113113
readelf_program_headers() {
@@ -141,7 +141,7 @@ EOF
141141
validate_android_library() {
142142
lib="$1"
143143
if ! has_dwarf_debug_metadata "$lib"; then
144-
echo "Error: Android native library has no full DWARF debug metadata: $lib"
144+
echo "Error: Android native library has no .debug_info DWARF metadata: $lib"
145145
exit 1
146146
fi
147147

0 commit comments

Comments
 (0)