Skip to content

Rolling up PRs in the queue #13443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d3c831b
std: use a `match` in `assert_eq!` to extend the lifetime of the args.
huonw Apr 7, 2014
4b9a7a2
collections: replace all ~[T] with Vec<T>.
huonw Apr 5, 2014
5bcb761
auto merge of #13350 : huonw/rust/devec-collections, r=alexcrichton
bors Apr 10, 2014
43e8ace
debuginfo: Improve source code position assignment for inlined functi…
michaelwoerister Mar 27, 2014
c26d254
debuginfo: Implement discriminator type metadata re-use.
michaelwoerister Mar 27, 2014
5099b8c
debuginfo: Don't create debuginfo for statics inlined from other crates.
michaelwoerister Apr 10, 2014
8135032
Remove references to @Trait from a compiler error message
lilyball Apr 9, 2014
342e8b5
Fix outdated lint warning about inner attribute
milibopp Apr 9, 2014
a65411e
std,serialize: remove some internal uses of ~[].
huonw Apr 9, 2014
3015949
std,native,green,rustuv: make readdir return `Vec`.
huonw Apr 9, 2014
1403b35
std,syntax: make std::fmt::parse use `Vec`s.
huonw Apr 9, 2014
8ec16e1
green: de-~[].
huonw Apr 9, 2014
32cf4a1
native: remove some internal ~[].
huonw Apr 9, 2014
6e63b12
Remove some internal ~[] from several libraries.
huonw Apr 9, 2014
b994828
Stop using transmute_mut in RefCell
sfackler Apr 9, 2014
a70f8d9
Remove an unnecessary file.
omasanori Apr 9, 2014
da25539
Generalized the pretty-print entry points to support `-o <file>`.
pnkfelix Apr 8, 2014
6d6d4c9
test: Add a test for #7663
alexcrichton Apr 8, 2014
dd00bf3
mk: Add a dummy CFG_COMPILER_HOST_TRIPLE to rustdoc invocation.
lifthrasiir Apr 8, 2014
34ece7a
rustdoc: Clean the `initSearch` routine up.
lifthrasiir Apr 8, 2014
85299e3
rustdoc: Prune the paths that do not appear in the index.
lifthrasiir Apr 8, 2014
ec99673
rustc: Remove absolute rpaths
alexcrichton Apr 7, 2014
f9e17e1
rustc: Don't rpath to librustrt.dylib
alexcrichton Apr 8, 2014
25a6b6e
rustc: Add a realpath utility function
alexcrichton Apr 8, 2014
3f2c55f
rustc: Use realpath() for sysroot/rpath
alexcrichton Apr 8, 2014
0bf4e90
Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalF…
kaseyc Apr 7, 2014
83d2c0b
rustc: Disallow importing through use statements
alexcrichton Apr 8, 2014
df533c6
rustc: Don't succeed on shadowed nonexistent import
alexcrichton Apr 8, 2014
1f2c18a
rustc: Don't allow priv use to shadow pub use
alexcrichton Apr 8, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rustc: Use realpath() for sysroot/rpath
When calculating the sysroot, it's more accurate to use realpath() rather than
just one readlink() to account for any intermediate symlinks that the rustc
binary resolves itself to.

For rpath, realpath() is necessary because the rpath must dictate a relative
rpath from the destination back to the originally linked library, which works
more robustly if there are no symlinks involved.

Concretely, any binary generated on OSX into $TMPDIR requires an absolute rpath
because the temporary directory is behind a symlink with one layer of
indirection. This symlink causes all relative rpaths to fail to resolve.

cc #11734
cc #11857
  • Loading branch information
alexcrichton committed Apr 10, 2014
commit 3f2c55f7d5b5c7717dd12eef4572c52a4e8ff550
7 changes: 4 additions & 3 deletions src/librustc/back/rpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
use driver::session::Session;
use metadata::cstore;
use metadata::filesearch;
use util::fs;

use collections::HashSet;
use std::{os, slice};
use std::os;
use syntax::abi;

fn not_win32(os: abi::Os) -> bool {
Expand Down Expand Up @@ -121,9 +122,9 @@ pub fn get_rpath_relative_to_output(os: abi::Os,
abi::OsWin32 => unreachable!()
};

let mut lib = os::make_absolute(lib);
let mut lib = fs::realpath(&os::make_absolute(lib)).unwrap();
lib.pop();
let mut output = os::make_absolute(output);
let mut output = fs::realpath(&os::make_absolute(output)).unwrap();
output.pop();
let relative = lib.path_relative_from(&output);
let relative = relative.expect("could not create rpath relative to output");
Expand Down
17 changes: 6 additions & 11 deletions src/librustc/metadata/filesearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ use std::os;
use std::io::fs;
use collections::HashSet;

use myfs = util::fs;

pub enum FileMatch { FileMatches, FileDoesntMatch }

// A module for searching for libraries
Expand Down Expand Up @@ -156,17 +158,10 @@ fn make_rustpkg_target_lib_path(sysroot: &Path,
pub fn get_or_default_sysroot() -> Path {
// Follow symlinks. If the resolved path is relative, make it absolute.
fn canonicalize(path: Option<Path>) -> Option<Path> {
path.and_then(|mut path|
match fs::readlink(&path) {
Ok(canon) => {
if canon.is_absolute() {
Some(canon)
} else {
path.pop();
Some(path.join(canon))
}
},
Err(..) => Some(path),
path.and_then(|path|
match myfs::realpath(&path) {
Ok(canon) => Some(canon),
Err(e) => fail!("failed to get realpath: {}", e),
})
}

Expand Down