File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -91,28 +91,20 @@ $(LIBRARY_RELEASE_$(OS)): $(INIT_BINARY)
91
91
ifeq ($(SEV ) ,1)
92
92
mv target/release/libkrun.so target/release/$(KRUN_BASE_$(OS))
93
93
endif
94
- ifeq ($(OS ) ,Linux)
95
- patchelf --set-soname $(KRUN_SONAME_$(OS)) --output $(LIBRARY_RELEASE_$(OS)) target/release/$(KRUN_BASE_$(OS))
96
- else
97
- ifeq ($(EFI ) ,1)
98
94
ifeq ($(OS ) ,Darwin)
95
+ ifeq ($(EFI ) ,1)
99
96
install_name_tool -id libkrun-efi.dylib target/release/libkrun.dylib
100
97
endif
101
98
mv target/release/libkrun.dylib target/release/$(KRUN_BASE_$(OS))
102
99
endif
103
100
cp target/release/$(KRUN_BASE_$(OS)) $(LIBRARY_RELEASE_$(OS))
104
- endif
105
101
106
102
$(LIBRARY_DEBUG_$(OS ) ) : $(INIT_BINARY )
107
103
cargo build $(FEATURE_FLAGS )
108
104
ifeq ($(SEV ) ,1)
109
105
mv target/debug/libkrun.so target/debug/$(KRUN_BASE_$(OS))
110
106
endif
111
- ifeq ($(OS ) ,Linux)
112
- patchelf --set-soname $(KRUN_SONAME_$(OS)) --output $(LIBRARY_DEBUG_$(OS)) target/debug/$(KRUN_BASE_$(OS))
113
- else
114
107
cp target/debug/$(KRUN_BASE_$(OS)) $(LIBRARY_DEBUG_$(OS))
115
- endif
116
108
117
109
libkrun.pc : libkrun.pc.in Makefile
118
110
rm -f $@ $@ -t
Original file line number Diff line number Diff line change 1
1
fn main ( ) {
2
+ #[ cfg( target_os = "linux" ) ]
3
+ println ! (
4
+ "cargo:rustc-cdylib-link-arg=-Wl,-soname,libkrun.so.{}" ,
5
+ std:: env:: var( "CARGO_PKG_VERSION_MAJOR" ) . unwrap( )
6
+ ) ;
2
7
#[ cfg( target_os = "macos" ) ]
3
8
println ! ( "cargo:rustc-link-lib=framework=Hypervisor" ) ;
4
9
}
You can’t perform that action at this time.
0 commit comments