Skip to content

Commit

Permalink
Mac uses @executable_path instead of $ORIGIN
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Oct 6, 2011
1 parent 5cd6dbd commit 831d861
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/comp/back/rpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn get_rpath_relative_to_output(os: session::os,
// Mac doesn't appear to support $ORIGIN
let prefix = alt os {
session::os_linux. { "$ORIGIN" + fs::path_sep() }
session::os_macos. { "" }
session::os_macos. { "@executable_path" + fs::path_sep() }
};

prefix + get_relative_to(
Expand Down Expand Up @@ -322,7 +322,7 @@ mod test {
fn test_rpath_relative() {
let res = get_rpath_relative_to_output(session::os_macos,
"/usr", "bin/rustc", "lib/libstd.so");
assert res == "../lib";
assert res == "@executable_path/../lib";
}

#[test]
Expand Down

0 comments on commit 831d861

Please sign in to comment.