File tree Expand file tree Collapse file tree 5 files changed +12
-29
lines changed Expand file tree Collapse file tree 5 files changed +12
-29
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,4 @@ pub fn strip_libraries(lib_path: &str) {
52
52
strip. wait ( ) . expect ( "Failed to strip library" ) ;
53
53
}
54
54
55
- pub fn fix_soname ( _lib_path : & str ) { }
56
-
57
55
pub fn add_additional_files ( _lib_path : & str , _target_path : & OsStr ) { }
Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ pub const PROF_DYNAMIC_LIB_FFI: &str = "libdatadog_profiling_ffi.so";
12
12
pub const PROF_STATIC_LIB_FFI : & str = "libdatadog_profiling_ffi.a" ;
13
13
pub const REMOVE_RPATH : bool = false ;
14
14
pub const BUILD_CRASHTRACKER : bool = true ;
15
- pub const RUSTFLAGS : [ & str ; 2 ] = [ "-C" , "relocation-model=pic" ] ;
15
+ pub const RUSTFLAGS : [ & str ; 4 ] = [
16
+ "-C" ,
17
+ "relocation-model=pic" ,
18
+ "-C" ,
19
+ "link-arg=-Wl,-soname,libdatadog_profiling.so" ,
20
+ ] ;
16
21
17
22
pub fn fix_rpath ( lib_path : & str ) {
18
23
if REMOVE_RPATH {
@@ -62,15 +67,4 @@ pub fn strip_libraries(lib_path: &str) {
62
67
debug. wait ( ) . expect ( "Failed to set debuglink" ) ;
63
68
}
64
69
65
- pub fn fix_soname ( lib_path : & str ) {
66
- let mut patch_soname = Command :: new ( "patchelf" )
67
- . arg ( "--set-soname" )
68
- . arg ( PROF_DYNAMIC_LIB )
69
- . arg ( lib_path. to_owned ( ) + "/" + PROF_DYNAMIC_LIB )
70
- . spawn ( )
71
- . expect ( "failed to span patchelf" ) ;
72
-
73
- patch_soname. wait ( ) . expect ( "failed to change the soname" ) ;
74
- }
75
-
76
70
pub fn add_additional_files ( _lib_path : & str , _target_path : & OsStr ) { }
Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ pub const PROF_DYNAMIC_LIB_FFI: &str = "libdatadog_profiling_ffi.so";
12
12
pub const PROF_STATIC_LIB_FFI : & str = "libdatadog_profiling_ffi.a" ;
13
13
pub const REMOVE_RPATH : bool = false ;
14
14
pub const BUILD_CRASHTRACKER : bool = true ;
15
- pub const RUSTFLAGS : [ & str ; 2 ] = [ "-C" , "relocation-model=pic" ] ;
15
+ pub const RUSTFLAGS : [ & str ; 4 ] = [
16
+ "-C" ,
17
+ "relocation-model=pic" ,
18
+ "-C" ,
19
+ "link-arg=-Wl,-soname,libdatadog_profiling.so" ,
20
+ ] ;
16
21
17
22
pub fn fix_rpath ( lib_path : & str ) {
18
23
if REMOVE_RPATH {
@@ -60,15 +65,4 @@ pub fn strip_libraries(lib_path: &str) {
60
65
debug. wait ( ) . expect ( "Failed to set debuglink" ) ;
61
66
}
62
67
63
- pub fn fix_soname ( lib_path : & str ) {
64
- let mut patch_soname = Command :: new ( "patchelf" )
65
- . arg ( "--set-soname" )
66
- . arg ( PROF_DYNAMIC_LIB )
67
- . arg ( lib_path. to_owned ( ) + "/" + PROF_DYNAMIC_LIB )
68
- . spawn ( )
69
- . expect ( "failed to spawn patchelf" ) ;
70
-
71
- patch_soname. wait ( ) . expect ( "failed to change the soname" ) ;
72
- }
73
-
74
68
pub fn add_additional_files ( _lib_path : & str , _target_path : & OsStr ) { }
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ pub const RUSTFLAGS: [&str; 4] = [
23
23
24
24
pub fn fix_rpath ( _lib_path : & str ) { }
25
25
pub fn strip_libraries ( _lib_path : & str ) { }
26
- pub fn fix_soname ( _lib_path : & str ) { }
27
26
28
27
pub fn add_additional_files ( lib_path : & str , target_path : & OsStr ) {
29
28
let from_pdb: PathBuf = [ lib_path, PROF_PDB_FFI ] . iter ( ) . collect ( ) ;
Original file line number Diff line number Diff line change @@ -109,8 +109,6 @@ impl Profiling {
109
109
110
110
arch:: add_additional_files ( & self . source_lib , lib_dir. as_os_str ( ) ) ;
111
111
112
- arch:: fix_soname ( & self . target_lib ) ;
113
-
114
112
// Generate debug information
115
113
arch:: strip_libraries ( & self . target_lib ) ;
116
114
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments