Skip to content

Commit 952b058

Browse files
committed
Split debug - publish debug info
- Publish debug info - Add a linker flag to ensure build ID is added (even on musl)
1 parent 98d0a12 commit 952b058

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

ddprof-lib/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,19 @@ tasks.register('javadocJar', Jar) {
598598
from javadoc.destinationDir
599599
}
600600

601+
tasks.register('debugInfoJar', Jar) {
602+
onlyIf {
603+
!shouldSkipDebugExtraction()
604+
}
605+
dependsOn 'copyReleaseDebugFiles'
606+
archiveBaseName = libraryName
607+
archiveClassifier = 'debugInfo'
608+
archiveVersion = component_version
609+
from files(libraryTargetBase('release-debug')) {
610+
include "**/*"
611+
}
612+
}
613+
601614
tasks.register('scanBuild', Exec) {
602615
workingDir "${projectDir}/src/test/make"
603616
commandLine 'scan-build'
@@ -667,6 +680,7 @@ publishing {
667680
}
668681
publication.artifact sourcesJar
669682
publication.artifact javadocJar
683+
publication.artifact debugInfoJar
670684

671685
publication.groupId = 'com.datadoghq'
672686
publication.artifactId = 'ddprof'

gradle/configurations.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def commonLinuxCompilerArgs = [
119119
"-DCOUNTERS"
120120
]
121121

122-
def commonLinuxLinkerArgs = ["-ldl", "-Wl,-z,defs", "--verbose", "-lpthread", "-lm", "-lrt", "-v"]
122+
def commonLinuxLinkerArgs = ["-ldl", "-Wl,-z,defs", "--verbose", "-lpthread", "-lm", "-lrt", "-v", "-Wl,--build-id"]
123123

124124
def commonMacosCompilerArgs = commonLinuxCompilerArgs + ["-D_XOPEN_SOURCE", "-D_DARWIN_C_SOURCE"]
125125

0 commit comments

Comments
 (0)