[build] Add SONAME at link time instead of using patchelf#1258
Merged
dd-mergequeue[bot] merged 2 commits intomainfrom Oct 3, 2025
Merged
[build] Add SONAME at link time instead of using patchelf#1258dd-mergequeue[bot] merged 2 commits intomainfrom
dd-mergequeue[bot] merged 2 commits intomainfrom
Conversation
BenchmarksComparisonBenchmark execution time: 2025-10-03 13:28:47 Comparing candidate commit 674ab20 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
BaselineOmitted due to size. |
Contributor
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
hoolioh
approved these changes
Oct 3, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1258 +/- ##
==========================================
+ Coverage 71.81% 71.87% +0.05%
==========================================
Files 356 356
Lines 56677 56665 -12
==========================================
+ Hits 40702 40726 +24
+ Misses 15975 15939 -36
🚀 New features to boost your workflow:
|
Contributor
Author
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
gh-worker-dd-mergequeue-cf854d bot
pushed a commit
that referenced
this pull request
Mar 5, 2026
…e for linking (#1646) # What does this PR do? for macOS builds we were not setting `LC_ID_DYLIB`, so the absolute path at build time was being used, which causes problems when you link against the dylib on another machine. This PR should correctly set `LC_ID_DYLIB` for macOS. Something similar was done for linux in #1258 The post-build fix logic has been removed since it doesn't seem to be used anywhere else anymore. # Motivation What inspired you to submit this pull request? # Additional Notes Anything else we should know when reviewing? # How to test the change? `cargo run --bin release --release -- --out /tmp/libdatadog-output` Prior to this change the output would have looked like: ``` cmd LC_ID_DYLIB cmdsize 184 name /Users/ec2-user/builds/.../libdatadog_profiling_ffi.dylib (offset 24) ``` With this change it now looks like: ``` cmd LC_ID_DYLIB cmdsize 64 name @rpath/libdatadog_profiling.dylib (offset 24) ``` Co-authored-by: hoolioh <[email protected]> Co-authored-by: julio.gonzalez <[email protected]>
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.
What does this PR do?
Set
SONAMEat link time instead of using patchelf.Motivation
Setting the
SONAMEat link time is better and stronger that doing it with patchelf (which can fail depending on patchelf version)How to test the change?
Downloaded all linux artifacts from https://gitlab.ddbuild.io/DataDog/apm-reliability/libddprof-build/-/jobs/1162074341
And run
readelf -don each of them to make sure thatlibdatadog_profiling.sois theSONAME:Sanity check, there are 4
libdatadog_profiling.so: