[build] Add SONAME at link time instead of using patchelf#1258
[build] Add SONAME at link time instead of using patchelf#1258dd-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. |
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
|
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:
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
…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 <107922352+hoolioh@users.noreply.github.com> Co-authored-by: julio.gonzalez <julio.gonzalez@datadoghq.com>
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: