Skip to content

Commit 062ba22

Browse files
committed
rpathing is based on the target, not host OS
1 parent d8a85f0 commit 062ba22

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/comp/back/rpath.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ import util::filesearch;
1313
// to be exported
1414
export get_rpath_flags, test;
1515

16-
#[cfg(target_os="linux")]
17-
#[cfg(target_os="macos")]
1816
fn get_rpath_flags(sess: session::session, out_filename: str) -> [str] {
17+
// No rpath on windows
18+
if sess.get_targ_cfg().os == session::os_win32 {
19+
ret [];
20+
}
21+
1922
log "preparing the RPATH!";
2023

2124
let cwd = os::getcwd();
@@ -31,11 +34,6 @@ fn get_rpath_flags(sess: session::session, out_filename: str) -> [str] {
3134
rpaths_to_flags(rpaths)
3235
}
3336

34-
#[cfg(target_os="win32")]
35-
fn get_rpath_flags(_sess: session::session, _out_filename: str) -> [str] {
36-
[]
37-
}
38-
3937
fn get_sysroot_absolute_rt_lib(sess: session::session) -> fs::path {
4038
let path = [sess.filesearch().sysroot()]
4139
+ filesearch::relative_target_lib_path(

0 commit comments

Comments
 (0)