File tree Expand file tree Collapse file tree 7 files changed +14
-1
lines changed
Expand file tree Collapse file tree 7 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,9 @@ def build_bootstrap(self):
367367 env ["DYLD_LIBRARY_PATH" ] = os .path .join (self .bin_root (), "lib" ) + \
368368 (os .pathsep + env ["DYLD_LIBRARY_PATH" ]) \
369369 if "DYLD_LIBRARY_PATH" in env else ""
370+ env ["LIBRARY_PATH" ] = os .path .join (self .bin_root (), "lib" ) + \
371+ (os .pathsep + env ["LIBRARY_PATH" ]) \
372+ if "LIBRARY_PATH" in env else ""
370373 env ["PATH" ] = os .path .join (self .bin_root (), "bin" ) + \
371374 os .pathsep + env ["PATH" ]
372375 if not os .path .isfile (self .cargo ()):
Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ pub fn dylib_path_var() -> &'static str {
139139 "PATH"
140140 } else if cfg ! ( target_os = "macos" ) {
141141 "DYLD_LIBRARY_PATH"
142+ } else if cfg ! ( target_os = "haiku" ) {
143+ "LIBRARY_PATH"
142144 } else {
143145 "LD_LIBRARY_PATH"
144146 }
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ impl DynamicLibrary {
6868 "PATH"
6969 } else if cfg ! ( target_os = "macos" ) {
7070 "DYLD_LIBRARY_PATH"
71+ } else if cfg ! ( target_os = "haiku" ) {
72+ "LIBRARY_PATH"
7173 } else {
7274 "LD_LIBRARY_PATH"
7375 }
Original file line number Diff line number Diff line change @@ -16,9 +16,10 @@ pub fn opts() -> TargetOptions {
1616 linker : "cc" . to_string ( ) ,
1717 dynamic_linking : true ,
1818 executables : true ,
19- has_rpath : true ,
19+ has_rpath : false ,
2020 target_family : Some ( "unix" . to_string ( ) ) ,
2121 linker_is_gnu : true ,
22+ no_integrated_as : true ,
2223 .. Default :: default ( )
2324 }
2425}
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ mod imp {
113113 pub l_sysid : libc:: c_int ,
114114 }
115115
116+ pub const F_RDLCK : libc:: c_short = 0x0040 ;
116117 pub const F_UNLCK : libc:: c_short = 0x0200 ;
117118 pub const F_WRLCK : libc:: c_short = 0x0400 ;
118119 pub const F_SETLK : libc:: c_int = 0x0080 ;
Original file line number Diff line number Diff line change @@ -39,5 +39,7 @@ fn main() {
3939 println ! ( "cargo:rustc-link-lib=static-nobundle=pthread" ) ;
4040 } else if target. contains ( "fuchsia" ) {
4141 println ! ( "cargo:rustc-link-lib=unwind" ) ;
42+ } else if target. contains ( "haiku" ) {
43+ println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
4244 }
4345}
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ pub fn dylib_env_var() -> &'static str {
2020 "PATH"
2121 } else if cfg ! ( target_os = "macos" ) {
2222 "DYLD_LIBRARY_PATH"
23+ } else if cfg ! ( target_os = "haiku" ) {
24+ "LIBRARY_PATH"
2325 } else {
2426 "LD_LIBRARY_PATH"
2527 }
You can’t perform that action at this time.
0 commit comments