mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Set the MacOS rpath in the build script (#30054)
Use the build script to set the rpath in MacOS instead of mach. This is another step toward allowing building servo without mach.
This commit is contained in:
parent
fef332f385
commit
f3c7db7d0f
3 changed files with 12 additions and 14 deletions
|
@ -25,6 +25,12 @@ fn main() {
|
|||
println!("cargo:rustc-env=VERGEN_GIT_SHA=nogit");
|
||||
}
|
||||
|
||||
// On MacOS, all dylib dependencies are shipped along with the binary
|
||||
// in the "/lib" directory. Setting the rpath here, allows the dynamic
|
||||
// linker to locate them. See `man dyld` for more info.
|
||||
#[cfg(target_os = "macos")]
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path/lib/");
|
||||
|
||||
// Generate GL bindings
|
||||
// For now, we only support EGL, and only on Windows and Android.
|
||||
if target.contains("android") || target.contains("windows") {
|
||||
|
|
|
@ -36,4 +36,10 @@ fn main() {
|
|||
);
|
||||
println!("cargo:rustc-env=VERGEN_GIT_SHA=nogit");
|
||||
}
|
||||
|
||||
// On MacOS, all dylib dependencies are shipped along with the binary
|
||||
// in the "/lib" directory. Setting the rpath here, allows the dynamic
|
||||
// linker to locate them. See `man dyld` for more info.
|
||||
#[cfg(target_os = "macos")]
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path/lib/");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue