rust: update to 2015-03-09
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
From 146ea5d4ada08dcc237ba759d19e2729511d46e8 Mon Sep 17 00:00:00 2001
|
From 2711cb85326a872fa88dc675ee9f51178db7e90f Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Wed, 26 Nov 2014 10:00:32 -0500
|
Date: Wed, 26 Nov 2014 10:00:32 -0500
|
||||||
Subject: [PATCH 01/12] libstd/io/process/Command: fully quote and escape the
|
Subject: [PATCH 01/12] libstd/io/process/Command: fully quote and escape the
|
||||||
@@ -15,10 +15,10 @@ shell.
|
|||||||
1 file changed, 28 insertions(+), 3 deletions(-)
|
1 file changed, 28 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
|
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
|
||||||
index a13295b..fe12546 100644
|
index e02e863..2381b6a 100644
|
||||||
--- a/src/libstd/old_io/process.rs
|
--- a/src/libstd/old_io/process.rs
|
||||||
+++ b/src/libstd/old_io/process.rs
|
+++ b/src/libstd/old_io/process.rs
|
||||||
@@ -30,6 +30,7 @@ use sync::mpsc::{channel, Receiver};
|
@@ -33,6 +33,7 @@ use sync::mpsc::{channel, Receiver};
|
||||||
use sys::fs::FileDesc;
|
use sys::fs::FileDesc;
|
||||||
use sys::process::Process as ProcessImp;
|
use sys::process::Process as ProcessImp;
|
||||||
use sys;
|
use sys;
|
||||||
@@ -26,7 +26,7 @@ index a13295b..fe12546 100644
|
|||||||
use thread;
|
use thread;
|
||||||
|
|
||||||
#[cfg(windows)] use hash;
|
#[cfg(windows)] use hash;
|
||||||
@@ -394,15 +395,39 @@ impl Command {
|
@@ -397,15 +398,39 @@ impl Command {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From c227b05fab797ec7c03ffafea171af0d46a928ff Mon Sep 17 00:00:00 2001
|
From 0622debed9ff0047ce8c4c55fd027255c104ecb5 Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Mon, 1 Dec 2014 15:50:13 -0500
|
Date: Mon, 1 Dec 2014 15:50:13 -0500
|
||||||
Subject: [PATCH 02/12] std/io/process: add Debug tests
|
Subject: [PATCH 02/12] std/io/process: add Debug tests
|
||||||
@@ -8,10 +8,10 @@ Subject: [PATCH 02/12] std/io/process: add Debug tests
|
|||||||
1 file changed, 12 insertions(+)
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
|
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
|
||||||
index fe12546..ae61c01 100644
|
index 2381b6a..fd895aa 100644
|
||||||
--- a/src/libstd/old_io/process.rs
|
--- a/src/libstd/old_io/process.rs
|
||||||
+++ b/src/libstd/old_io/process.rs
|
+++ b/src/libstd/old_io/process.rs
|
||||||
@@ -1254,4 +1254,16 @@ mod tests {
|
@@ -1257,4 +1257,16 @@ mod tests {
|
||||||
let val = env.get(&EnvKey(CString::new(b"PATH").unwrap()));
|
let val = env.get(&EnvKey(CString::new(b"PATH").unwrap()));
|
||||||
assert!(val.unwrap() == &CString::new(b"bar").unwrap());
|
assert!(val.unwrap() == &CString::new(b"bar").unwrap());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 569b5bed4cd94c85db41ea6b0a1c3cc6aa977e43 Mon Sep 17 00:00:00 2001
|
From d113c693a7218f49b7e0f21b125df92bffb57c5e Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Sat, 15 Nov 2014 20:12:48 -0500
|
Date: Sat, 15 Nov 2014 20:12:48 -0500
|
||||||
Subject: [PATCH 03/12] platform.mk: avoid choking on i586
|
Subject: [PATCH 03/12] platform.mk: avoid choking on i586
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 6e54f848c836fe95401672c8a4696e885cd6becf Mon Sep 17 00:00:00 2001
|
From 38f4a903ceb9d96d9229540a19c8449739ebf2ef Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Mon, 17 Nov 2014 16:14:15 -0500
|
Date: Mon, 17 Nov 2014 16:14:15 -0500
|
||||||
Subject: [PATCH 04/12] mk/rt/compiler_rt: pass LDFLAGS from
|
Subject: [PATCH 04/12] mk/rt/compiler_rt: pass LDFLAGS from
|
||||||
|
|||||||
+19
-20
@@ -1,4 +1,4 @@
|
|||||||
From 9d4c54f58e86009b4a550d92de5e741da30ac4f4 Mon Sep 17 00:00:00 2001
|
From fd1f1f2df5f9e3549e90191574b3e1bc515a0c5c Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Tue, 18 Nov 2014 01:40:21 -0500
|
Date: Tue, 18 Nov 2014 01:40:21 -0500
|
||||||
Subject: [PATCH 05/12] Target: add default target.json path:
|
Subject: [PATCH 05/12] Target: add default target.json path:
|
||||||
@@ -11,10 +11,10 @@ Subject: [PATCH 05/12] Target: add default target.json path:
|
|||||||
3 files changed, 14 insertions(+), 8 deletions(-)
|
3 files changed, 14 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
|
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
|
||||||
index efcde8b..dba6f98 100644
|
index 1b09be0..81a690b 100644
|
||||||
--- a/src/librustc/session/config.rs
|
--- a/src/librustc/session/config.rs
|
||||||
+++ b/src/librustc/session/config.rs
|
+++ b/src/librustc/session/config.rs
|
||||||
@@ -637,12 +637,12 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
|
@@ -661,12 +661,12 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
|
||||||
v
|
v
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,11 +31,11 @@ index efcde8b..dba6f98 100644
|
|||||||
|
|
||||||
let (int_type, uint_type) = match &target.target_pointer_width[..] {
|
let (int_type, uint_type) = match &target.target_pointer_width[..] {
|
||||||
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
|
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
|
||||||
index 99b2fce..780b863 100644
|
index 8bc8426..5ccb50a 100644
|
||||||
--- a/src/librustc/session/mod.rs
|
--- a/src/librustc/session/mod.rs
|
||||||
+++ b/src/librustc/session/mod.rs
|
+++ b/src/librustc/session/mod.rs
|
||||||
@@ -337,14 +337,18 @@ pub fn build_session_(sopts: config::Options,
|
@@ -346,14 +346,18 @@ pub fn build_session_(sopts: config::Options,
|
||||||
local_crate_source_file: Option<Path>,
|
local_crate_source_file: Option<PathBuf>,
|
||||||
span_diagnostic: diagnostic::SpanHandler)
|
span_diagnostic: diagnostic::SpanHandler)
|
||||||
-> Session {
|
-> Session {
|
||||||
- let host = match Target::search(config::host_triple()) {
|
- let host = match Target::search(config::host_triple()) {
|
||||||
@@ -56,36 +56,35 @@ index 99b2fce..780b863 100644
|
|||||||
let default_sysroot = match sopts.maybe_sysroot {
|
let default_sysroot = match sopts.maybe_sysroot {
|
||||||
Some(_) => None,
|
Some(_) => None,
|
||||||
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
|
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
|
||||||
index d09a7c3..7a8e293 100644
|
index 4663901..a77b166 100644
|
||||||
--- a/src/librustc_back/target/mod.rs
|
--- a/src/librustc_back/target/mod.rs
|
||||||
+++ b/src/librustc_back/target/mod.rs
|
+++ b/src/librustc_back/target/mod.rs
|
||||||
@@ -308,13 +308,14 @@ impl Target {
|
@@ -309,12 +309,13 @@ impl Target {
|
||||||
///
|
///
|
||||||
/// The error string could come from any of the APIs called, including filesystem access and
|
/// The error string could come from any of the APIs called, including
|
||||||
/// JSON decoding.
|
/// filesystem access and JSON decoding.
|
||||||
- pub fn search(target: &str) -> Result<Target, String> {
|
- pub fn search(target: &str) -> Result<Target, String> {
|
||||||
+ pub fn search(sysroot: &Path, target: &str) -> Result<Target, String> {
|
+ pub fn search(sysroot: &Path, target: &str) -> Result<Target, String> {
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::os;
|
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::old_io::File;
|
use std::fs::File;
|
||||||
use std::old_path::Path;
|
use std::path::{Path, PathBuf};
|
||||||
use serialize::json;
|
use serialize::json;
|
||||||
+ use std::iter::IntoIterator;
|
+ use std::iter::IntoIterator;
|
||||||
|
|
||||||
fn load_file(path: &Path) -> Result<Target, String> {
|
fn load_file(path: &Path) -> Result<Target, String> {
|
||||||
let mut f = try!(File::open(path).map_err(|e| format!("{:?}", e)));
|
let mut f = try!(File::open(path).map_err(|e| e.to_string()));
|
||||||
@@ -395,9 +396,10 @@ impl Target {
|
@@ -399,9 +400,10 @@ impl Target {
|
||||||
|
let target_path = env::var_os("RUST_TARGET_PATH")
|
||||||
let target_path = env::var_os("RUST_TARGET_PATH").unwrap_or(OsString::from_str(""));
|
.unwrap_or(OsString::from_str(""));
|
||||||
|
|
||||||
- // FIXME 16351: add a sane default search path?
|
- // FIXME 16351: add a sane default search path?
|
||||||
+ let paths = os::split_paths(target_path.to_str().unwrap()).into_iter()
|
+ let paths = env::split_paths(&target_path)
|
||||||
+ .chain(Some(sysroot.join_many(&[env!("CFG_LIBDIR_RELATIVE"), "rustlib"])).into_iter());
|
+ .chain(Some(sysroot.join_many(&[env!("CFG_LIBDIR_RELATIVE"), "rustlib"])).into_iter());
|
||||||
|
|
||||||
- for dir in os::split_paths(target_path.to_str().unwrap()).iter() {
|
- for dir in env::split_paths(&target_path) {
|
||||||
+ for dir in paths {
|
+ for dir in paths {
|
||||||
let p = dir.join(path.clone());
|
let p = dir.join(&path);
|
||||||
if p.is_file() {
|
if p.is_file() {
|
||||||
return load_file(&p);
|
return load_file(&p);
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 591aa737a5c5ab9b488b7a3379c30ee46b717f28 Mon Sep 17 00:00:00 2001
|
From 120438ca81750d676159892a0cc140fd01bbe716 Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Tue, 18 Nov 2014 14:52:56 -0500
|
Date: Tue, 18 Nov 2014 14:52:56 -0500
|
||||||
Subject: [PATCH 06/12] mk: for stage0, use RUSTFLAGS to override target libs
|
Subject: [PATCH 06/12] mk: for stage0, use RUSTFLAGS to override target libs
|
||||||
@@ -13,7 +13,7 @@ stage0-rustc at the appropriate location.
|
|||||||
1 file changed, 11 insertions(+), 8 deletions(-)
|
1 file changed, 11 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/mk/main.mk b/mk/main.mk
|
diff --git a/mk/main.mk b/mk/main.mk
|
||||||
index 9752ee2..8f09d7c 100644
|
index c00494b..984f9c0 100644
|
||||||
--- a/mk/main.mk
|
--- a/mk/main.mk
|
||||||
+++ b/mk/main.mk
|
+++ b/mk/main.mk
|
||||||
@@ -361,21 +361,22 @@ define SREQ
|
@@ -361,21 +361,22 @@ define SREQ
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From eccd34cb82536c1a057a9486dbf2d03edd5ce777 Mon Sep 17 00:00:00 2001
|
From 96c2d7ed4abd5ced4d3550772299d78a74f3e2ae Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Tue, 18 Nov 2014 13:48:14 -0500
|
Date: Tue, 18 Nov 2014 13:48:14 -0500
|
||||||
Subject: [PATCH 07/12] mk: add missing CFG_LIBDIR_RELATIVE
|
Subject: [PATCH 07/12] mk: add missing CFG_LIBDIR_RELATIVE
|
||||||
|
|||||||
+42
-40
@@ -1,4 +1,4 @@
|
|||||||
From 5ed89e6b244e9b41b4fc86652a64d086738c50b6 Mon Sep 17 00:00:00 2001
|
From 85b07a028ac5719da41ece758b114408a1e0c79a Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Mon, 24 Nov 2014 13:10:15 -0500
|
Date: Mon, 24 Nov 2014 13:10:15 -0500
|
||||||
Subject: [PATCH 08/12] configure: support --bindir, and extend libdir to
|
Subject: [PATCH 08/12] configure: support --bindir, and extend libdir to
|
||||||
@@ -13,17 +13,17 @@ relative to sysroot, and allows libdir to end in an arbitrary directory
|
|||||||
Note that this assumes absolute paths start with '/', which may break
|
Note that this assumes absolute paths start with '/', which may break
|
||||||
windows platforms
|
windows platforms
|
||||||
---
|
---
|
||||||
configure | 49 ++++++++++++++++-------
|
configure | 49 +++++++++++++++++------
|
||||||
mk/host.mk | 6 ++-
|
mk/host.mk | 6 ++-
|
||||||
mk/main.mk | 11 ++++++
|
mk/main.mk | 11 +++++
|
||||||
mk/perf.mk | 4 +-
|
mk/perf.mk | 4 +-
|
||||||
mk/prepare.mk | 4 +-
|
mk/prepare.mk | 4 +-
|
||||||
src/librustc/metadata/filesearch.rs | 78 ++++++++++++++-----------------------
|
src/librustc/metadata/filesearch.rs | 80 ++++++++++++++-----------------------
|
||||||
src/librustc_trans/back/link.rs | 3 +-
|
src/librustc_trans/back/link.rs | 3 +-
|
||||||
7 files changed, 86 insertions(+), 69 deletions(-)
|
7 files changed, 87 insertions(+), 70 deletions(-)
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
diff --git a/configure b/configure
|
||||||
index e722fe8..6674664 100755
|
index d56000b..c59c6f2 100755
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -309,6 +309,31 @@ envopt() {
|
@@ -309,6 +309,31 @@ envopt() {
|
||||||
@@ -58,7 +58,7 @@ index e722fe8..6674664 100755
|
|||||||
to_llvm_triple() {
|
to_llvm_triple() {
|
||||||
case $1 in
|
case $1 in
|
||||||
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
|
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
|
||||||
@@ -566,23 +591,15 @@ CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
|
@@ -570,23 +595,15 @@ CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
|
||||||
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ]
|
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ]
|
||||||
then
|
then
|
||||||
CFG_LIBDIR_RELATIVE=bin
|
CFG_LIBDIR_RELATIVE=bin
|
||||||
@@ -87,7 +87,7 @@ index e722fe8..6674664 100755
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $HELP -eq 1 ]
|
if [ $HELP -eq 1 ]
|
||||||
@@ -591,6 +608,11 @@ then
|
@@ -595,6 +612,11 @@ then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ index e722fe8..6674664 100755
|
|||||||
# Validate Options
|
# Validate Options
|
||||||
step_msg "validating $CFG_SELF args"
|
step_msg "validating $CFG_SELF args"
|
||||||
validate_opt
|
validate_opt
|
||||||
@@ -1355,6 +1377,7 @@ putvar CFG_PREFIX
|
@@ -1361,6 +1383,7 @@ putvar CFG_PREFIX
|
||||||
putvar CFG_HOST
|
putvar CFG_HOST
|
||||||
putvar CFG_TARGET
|
putvar CFG_TARGET
|
||||||
putvar CFG_LIBDIR_RELATIVE
|
putvar CFG_LIBDIR_RELATIVE
|
||||||
@@ -127,7 +127,7 @@ index 59a0095..b8e8345 100644
|
|||||||
|
|
||||||
endef
|
endef
|
||||||
diff --git a/mk/main.mk b/mk/main.mk
|
diff --git a/mk/main.mk b/mk/main.mk
|
||||||
index 8f09d7c..0252e18 100644
|
index 984f9c0..65d6f70 100644
|
||||||
--- a/mk/main.mk
|
--- a/mk/main.mk
|
||||||
+++ b/mk/main.mk
|
+++ b/mk/main.mk
|
||||||
@@ -330,7 +330,9 @@ export CFG_RELEASE_CHANNEL
|
@@ -330,7 +330,9 @@ export CFG_RELEASE_CHANNEL
|
||||||
@@ -195,7 +195,7 @@ index f1c4aa6..37c0a1a 100644
|
|||||||
prepare-base-$(1): PREPARE_DEST_MAN_DIR=$$(PREPARE_DEST_DIR)/share/man/man1
|
prepare-base-$(1): PREPARE_DEST_MAN_DIR=$$(PREPARE_DEST_DIR)/share/man/man1
|
||||||
prepare-base-$(1): prepare-everything-$(1)
|
prepare-base-$(1): prepare-everything-$(1)
|
||||||
diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
|
diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
|
||||||
index a8d39f9..c0f6189 100644
|
index 22a4a6f..c9148bc 100644
|
||||||
--- a/src/librustc/metadata/filesearch.rs
|
--- a/src/librustc/metadata/filesearch.rs
|
||||||
+++ b/src/librustc/metadata/filesearch.rs
|
+++ b/src/librustc/metadata/filesearch.rs
|
||||||
@@ -68,8 +68,7 @@ impl<'a> FileSearch<'a> {
|
@@ -68,8 +68,7 @@ impl<'a> FileSearch<'a> {
|
||||||
@@ -206,41 +206,43 @@ index a8d39f9..c0f6189 100644
|
|||||||
- self.sysroot, path, self.triple);
|
- self.sysroot, path, self.triple);
|
||||||
+ let tlib_path = make_rustpkg_lib_path(path, self.triple);
|
+ let tlib_path = make_rustpkg_lib_path(path, self.triple);
|
||||||
debug!("is {} in visited_dirs? {}", tlib_path.display(),
|
debug!("is {} in visited_dirs? {}", tlib_path.display(),
|
||||||
visited_dirs.contains(&tlib_path.as_vec().to_vec()));
|
visited_dirs.contains(&tlib_path));
|
||||||
|
|
||||||
@@ -155,7 +154,7 @@ impl<'a> FileSearch<'a> {
|
@@ -157,7 +156,7 @@ impl<'a> FileSearch<'a> {
|
||||||
// Returns a list of directories where target-specific tool binaries are located.
|
// Returns a list of directories where target-specific tool binaries are located.
|
||||||
pub fn get_tools_search_paths(&self) -> Vec<Path> {
|
pub fn get_tools_search_paths(&self) -> Vec<PathBuf> {
|
||||||
let mut p = Path::new(self.sysroot);
|
let mut p = PathBuf::new(self.sysroot);
|
||||||
- p.push(find_libdir(self.sysroot));
|
- p.push(&find_libdir(self.sysroot));
|
||||||
+ p.push(libdir_str());
|
+ p.push(libdir_str());
|
||||||
p.push(rustlibdir());
|
p.push(&rustlibdir());
|
||||||
p.push(self.triple);
|
p.push(&self.triple);
|
||||||
p.push("bin");
|
p.push("bin");
|
||||||
@@ -163,8 +162,8 @@ impl<'a> FileSearch<'a> {
|
@@ -165,8 +164,8 @@ impl<'a> FileSearch<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> Path {
|
-pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> PathBuf {
|
||||||
- let mut p = Path::new(find_libdir(sysroot));
|
- let mut p = PathBuf::new(&find_libdir(sysroot));
|
||||||
+pub fn relative_target_lib_path(target_triple: &str) -> Path {
|
+pub fn relative_target_lib_path(target_triple: &str) -> PathBuf {
|
||||||
+ let mut p = Path::new(libdir_str());
|
+ let mut p = PathBuf::new(&libdir_str());
|
||||||
assert!(p.is_relative());
|
assert!(p.is_relative());
|
||||||
p.push(rustlibdir());
|
p.push(&rustlibdir());
|
||||||
p.push(target_triple);
|
p.push(target_triple);
|
||||||
@@ -174,17 +173,24 @@ pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> Path {
|
@@ -175,18 +174,25 @@ pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> PathBuf
|
||||||
|
}
|
||||||
|
|
||||||
fn make_target_lib_path(sysroot: &Path,
|
fn make_target_lib_path(sysroot: &Path,
|
||||||
target_triple: &str) -> Path {
|
- target_triple: &str) -> PathBuf {
|
||||||
- sysroot.join(&relative_target_lib_path(sysroot, target_triple))
|
- sysroot.join(&relative_target_lib_path(sysroot, target_triple))
|
||||||
|
+ target_triple: &str) -> BufPath {
|
||||||
+ sysroot.join(&relative_target_lib_path(target_triple))
|
+ sysroot.join(&relative_target_lib_path(target_triple))
|
||||||
}
|
}
|
||||||
|
|
||||||
-fn make_rustpkg_lib_path(sysroot: &Path,
|
-fn make_rustpkg_lib_path(sysroot: &Path,
|
||||||
- dir: &Path,
|
- dir: &Path,
|
||||||
+fn make_rustpkg_lib_path(dir: &Path,
|
+fn make_rustpkg_lib_path(dir: &Path,
|
||||||
triple: &str) -> Path {
|
triple: &str) -> PathBuf {
|
||||||
- let mut p = dir.join(find_libdir(sysroot));
|
- let mut p = dir.join(&find_libdir(sysroot));
|
||||||
+ let mut p = dir.join(libdir_str());
|
+ let mut p = dir.join(libdir_str());
|
||||||
p.push(triple);
|
p.push(triple);
|
||||||
p
|
p
|
||||||
@@ -250,17 +252,17 @@ index a8d39f9..c0f6189 100644
|
|||||||
+ env!("CFG_BINDIR_RELATIVE")
|
+ env!("CFG_BINDIR_RELATIVE")
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+pub fn bindir_relative_path() -> Path {
|
+pub fn bindir_relative_path() -> PathBuf {
|
||||||
+ Path::new(bindir_relative_str())
|
+ PathBuf::new(bindir_relative_str())
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
pub fn get_or_default_sysroot() -> Path {
|
pub fn get_or_default_sysroot() -> PathBuf {
|
||||||
// Follow symlinks. If the resolved path is relative, make it absolute.
|
// Follow symlinks. If the resolved path is relative, make it absolute.
|
||||||
fn canonicalize(path: Option<Path>) -> Option<Path> {
|
fn canonicalize(path: Option<PathBuf>) -> Option<PathBuf> {
|
||||||
@@ -196,7 +202,17 @@ pub fn get_or_default_sysroot() -> Path {
|
@@ -199,7 +205,17 @@ pub fn get_or_default_sysroot() -> PathBuf {
|
||||||
}
|
}
|
||||||
|
|
||||||
match canonicalize(os::self_exe_name()) {
|
match canonicalize(env::current_exe().ok()) {
|
||||||
- Some(mut p) => { p.pop(); p.pop(); p }
|
- Some(mut p) => { p.pop(); p.pop(); p }
|
||||||
+ Some(mut p) => {
|
+ Some(mut p) => {
|
||||||
+ // Remove the exe name
|
+ // Remove the exe name
|
||||||
@@ -276,7 +278,7 @@ index a8d39f9..c0f6189 100644
|
|||||||
None => panic!("can't determine value for sysroot")
|
None => panic!("can't determine value for sysroot")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,45 +269,9 @@ pub fn rust_path() -> Vec<Path> {
|
@@ -254,45 +270,9 @@ pub fn rust_path() -> Vec<PathBuf> {
|
||||||
env_rust_path
|
env_rust_path
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +296,7 @@ index a8d39f9..c0f6189 100644
|
|||||||
-
|
-
|
||||||
- match option_env!("CFG_LIBDIR_RELATIVE") {
|
- match option_env!("CFG_LIBDIR_RELATIVE") {
|
||||||
- Some(libdir) if libdir != "lib" => return libdir.to_string(),
|
- Some(libdir) if libdir != "lib" => return libdir.to_string(),
|
||||||
- _ => if sysroot.join(primary_libdir_name()).join(rustlibdir()).exists() {
|
- _ => if sysroot.join(&primary_libdir_name()).join(&rustlibdir()).exists() {
|
||||||
- return primary_libdir_name();
|
- return primary_libdir_name();
|
||||||
- } else {
|
- } else {
|
||||||
- return secondary_libdir_name();
|
- return secondary_libdir_name();
|
||||||
@@ -326,20 +328,20 @@ index a8d39f9..c0f6189 100644
|
|||||||
|
|
||||||
// The name of rustc's own place to organize libraries.
|
// The name of rustc's own place to organize libraries.
|
||||||
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
|
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
|
||||||
index ea5001a..3050ff3 100644
|
index 3087a8e..891698a 100644
|
||||||
--- a/src/librustc_trans/back/link.rs
|
--- a/src/librustc_trans/back/link.rs
|
||||||
+++ b/src/librustc_trans/back/link.rs
|
+++ b/src/librustc_trans/back/link.rs
|
||||||
@@ -1004,11 +1004,10 @@ fn link_args(cmd: &mut Command,
|
@@ -1020,11 +1020,10 @@ fn link_args(cmd: &mut Command,
|
||||||
// where extern libraries might live, based on the
|
// where extern libraries might live, based on the
|
||||||
// addl_lib_search_paths
|
// addl_lib_search_paths
|
||||||
if sess.opts.cg.rpath {
|
if sess.opts.cg.rpath {
|
||||||
- let sysroot = sess.sysroot();
|
- let sysroot = sess.sysroot();
|
||||||
let target_triple = &sess.opts.target_triple;
|
let target_triple = &sess.opts.target_triple;
|
||||||
let get_install_prefix_lib_path = || {
|
let mut get_install_prefix_lib_path = || {
|
||||||
let install_prefix = option_env!("CFG_PREFIX").expect("CFG_PREFIX");
|
let install_prefix = option_env!("CFG_PREFIX").expect("CFG_PREFIX");
|
||||||
- let tlib = filesearch::relative_target_lib_path(sysroot, target_triple);
|
- let tlib = filesearch::relative_target_lib_path(sysroot, target_triple);
|
||||||
+ let tlib = filesearch::relative_target_lib_path(target_triple);
|
+ let tlib = filesearch::relative_target_lib_path(target_triple);
|
||||||
let mut path = Path::new(install_prefix);
|
let mut path = PathBuf::new(install_prefix);
|
||||||
path.push(&tlib);
|
path.push(&tlib);
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 257bdad6c0252b5f57aa9c61da71afd47ddfb4af Mon Sep 17 00:00:00 2001
|
From ebe9f1d9d76c62317858d9643ab6baf0e15fd267 Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Mon, 24 Nov 2014 13:54:42 -0500
|
Date: Mon, 24 Nov 2014 13:54:42 -0500
|
||||||
Subject: [PATCH 09/12] Parallelize submake invocations
|
Subject: [PATCH 09/12] Parallelize submake invocations
|
||||||
@@ -6,10 +6,10 @@ Subject: [PATCH 09/12] Parallelize submake invocations
|
|||||||
---
|
---
|
||||||
mk/clean.mk | 2 +-
|
mk/clean.mk | 2 +-
|
||||||
mk/install.mk | 8 ++++----
|
mk/install.mk | 8 ++++----
|
||||||
mk/llvm.mk | 4 ++--
|
mk/llvm.mk | 6 +++---
|
||||||
mk/rt.mk | 6 +++---
|
mk/rt.mk | 6 +++---
|
||||||
mk/util.mk | 2 ++
|
mk/util.mk | 2 ++
|
||||||
5 files changed, 12 insertions(+), 10 deletions(-)
|
5 files changed, 13 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
diff --git a/mk/clean.mk b/mk/clean.mk
|
diff --git a/mk/clean.mk b/mk/clean.mk
|
||||||
index 5b90d41..2a7ba6d 100644
|
index 5b90d41..2a7ba6d 100644
|
||||||
@@ -53,7 +53,7 @@ index 8850cd7..8878cf5 100644
|
|||||||
ifeq ($(CFG_DISABLE_DOCS),)
|
ifeq ($(CFG_DISABLE_DOCS),)
|
||||||
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
|
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
|
||||||
diff --git a/mk/llvm.mk b/mk/llvm.mk
|
diff --git a/mk/llvm.mk b/mk/llvm.mk
|
||||||
index ba2e073..3998806 100644
|
index b07c2a1..683dc60 100644
|
||||||
--- a/mk/llvm.mk
|
--- a/mk/llvm.mk
|
||||||
+++ b/mk/llvm.mk
|
+++ b/mk/llvm.mk
|
||||||
@@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
|
@@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
|
||||||
@@ -65,14 +65,16 @@ index ba2e073..3998806 100644
|
|||||||
$$(Q)touch $$(LLVM_CONFIG_$(1))
|
$$(Q)touch $$(LLVM_CONFIG_$(1))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ endif
|
@@ -38,8 +38,8 @@ endif
|
||||||
# the stamp in the source dir.
|
# the stamp in the source dir.
|
||||||
$$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
|
$$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
|
||||||
@$$(call E, make: cleaning llvm)
|
@$$(call E, make: cleaning llvm)
|
||||||
|
- $(Q)touch $$@.start_time
|
||||||
- $(Q)$(MAKE) clean-llvm$(1)
|
- $(Q)$(MAKE) clean-llvm$(1)
|
||||||
|
+ $$(Q)touch $$@.start_time
|
||||||
+ $$(Q)$$(P)$$(MAKE) clean-llvm$(1)
|
+ $$(Q)$$(P)$$(MAKE) clean-llvm$(1)
|
||||||
@$$(call E, make: done cleaning llvm)
|
@$$(call E, make: done cleaning llvm)
|
||||||
touch $$@
|
touch -r $$@.start_time $$@ && rm $$@.start_time
|
||||||
|
|
||||||
diff --git a/mk/rt.mk b/mk/rt.mk
|
diff --git a/mk/rt.mk b/mk/rt.mk
|
||||||
index 21280be..7f5af72 100644
|
index 21280be..7f5af72 100644
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 8bd76b2a28469de8ac95ff9e686820b47aee5d82 Mon Sep 17 00:00:00 2001
|
From 063c1fe978d1198948ece9cea28532b2ad21e208 Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Wed, 3 Dec 2014 19:15:19 -0500
|
Date: Wed, 3 Dec 2014 19:15:19 -0500
|
||||||
Subject: [PATCH 10/12] std/thread_local: workaround for NULL __dso_handle
|
Subject: [PATCH 10/12] std/thread_local: workaround for NULL __dso_handle
|
||||||
@@ -8,10 +8,10 @@ Subject: [PATCH 10/12] std/thread_local: workaround for NULL __dso_handle
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs
|
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs
|
||||||
index 764c7d7..ae6a295 100644
|
index 6bba734..9abed37 100644
|
||||||
--- a/src/libstd/thread_local/mod.rs
|
--- a/src/libstd/thread_local/mod.rs
|
||||||
+++ b/src/libstd/thread_local/mod.rs
|
+++ b/src/libstd/thread_local/mod.rs
|
||||||
@@ -400,7 +400,7 @@ mod imp {
|
@@ -402,7 +402,7 @@ mod imp {
|
||||||
#[linkage = "extern_weak"]
|
#[linkage = "extern_weak"]
|
||||||
static __cxa_thread_atexit_impl: *const ();
|
static __cxa_thread_atexit_impl: *const ();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 00b9d5870cb1ceb09ca0a2a5de765565afc9ac03 Mon Sep 17 00:00:00 2001
|
From 99bff656142992e54bbf6bec1fa0d532fce13e8d Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Mon, 2 Mar 2015 12:57:24 -0500
|
Date: Mon, 2 Mar 2015 12:57:24 -0500
|
||||||
Subject: [PATCH 11/12] configure & install: support disabling calling of
|
Subject: [PATCH 11/12] configure & install: support disabling calling of
|
||||||
@@ -10,10 +10,10 @@ Subject: [PATCH 11/12] configure & install: support disabling calling of
|
|||||||
2 files changed, 9 insertions(+), 4 deletions(-)
|
2 files changed, 9 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
diff --git a/configure b/configure
|
||||||
index 6674664..e948c06 100755
|
index c59c6f2..8200544 100755
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -550,6 +550,7 @@ opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
|
@@ -554,6 +554,7 @@ opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
|
||||||
opt rpath 0 "build rpaths into rustc itself"
|
opt rpath 0 "build rpaths into rustc itself"
|
||||||
opt nightly 0 "build nightly packages"
|
opt nightly 0 "build nightly packages"
|
||||||
opt verify-install 1 "verify installed binaries work"
|
opt verify-install 1 "verify installed binaries work"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 8b4d8e7156c6d545e5b782af0f8bdae01a8350e1 Mon Sep 17 00:00:00 2001
|
From 4c4bce191ec06eddd237481dcb1c3489e9b03921 Mon Sep 17 00:00:00 2001
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
Date: Mon, 2 Mar 2015 13:34:59 -0500
|
Date: Mon, 2 Mar 2015 13:34:59 -0500
|
||||||
Subject: [PATCH 12/12] mk/install: use disable-rewrite-paths
|
Subject: [PATCH 12/12] mk/install: use disable-rewrite-paths
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 2015-02-28
|
# 2015-03-09
|
||||||
SRCREV = "e233987ce1de88a48db2ce612019ba644d3cf5dd"
|
SRCREV = "91bdf23f504f79ed59617cde3dfebd3d5e39a476"
|
||||||
require rust-git.inc
|
require rust-git.inc
|
||||||
|
|
||||||
SRC_URI_append = "\
|
SRC_URI_append = "\
|
||||||
|
|||||||
Reference in New Issue
Block a user