bump rust

This commit is contained in:
Cody P Schafer
2015-03-01 23:12:51 -05:00
parent eaa153d122
commit cd348b34b0
11 changed files with 64 additions and 75 deletions
@@ -1,4 +1,4 @@
From 9011cf63782130e0acc72b9f53878dc2d3ac3971 Mon Sep 17 00:00:00 2001
From 6cf42137235a198163c4a4930e6ae773a9367102 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 26 Nov 2014 10:00:32 -0500
Subject: [PATCH 01/10] libstd/io/process/Command: fully quote and escape the
@@ -15,7 +15,7 @@ shell.
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
index c803cfb..e875435 100644
index a13295b..fe12546 100644
--- a/src/libstd/old_io/process.rs
+++ b/src/libstd/old_io/process.rs
@@ -30,6 +30,7 @@ use sync::mpsc::{channel, Receiver};
@@ -26,7 +26,7 @@ index c803cfb..e875435 100644
use thread;
#[cfg(windows)] use hash;
@@ -406,15 +407,39 @@ impl Command {
@@ -394,15 +395,39 @@ impl Command {
}
}
@@ -70,5 +70,5 @@ index c803cfb..e875435 100644
Ok(())
}
--
2.3.0
2.3.1
@@ -1,4 +1,4 @@
From 26ddca33f8ef01680f74f81177017bc94a38a8cd Mon Sep 17 00:00:00 2001
From 258a6258b9c2411a1487866c33042daa2639921f Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 1 Dec 2014 15:50:13 -0500
Subject: [PATCH 02/10] std/io/process: add Debug tests
@@ -8,10 +8,10 @@ Subject: [PATCH 02/10] std/io/process: add Debug tests
1 file changed, 12 insertions(+)
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
index e875435..0e7394d 100644
index fe12546..ae61c01 100644
--- a/src/libstd/old_io/process.rs
+++ b/src/libstd/old_io/process.rs
@@ -1266,4 +1266,16 @@ mod tests {
@@ -1254,4 +1254,16 @@ mod tests {
let val = env.get(&EnvKey(CString::new(b"PATH").unwrap()));
assert!(val.unwrap() == &CString::new(b"bar").unwrap());
}
@@ -29,5 +29,5 @@ index e875435..0e7394d 100644
+ }
}
--
2.3.0
2.3.1
@@ -1,4 +1,4 @@
From b7fe3ef0254ab2dc302d7e24a2033f58a52fe412 Mon Sep 17 00:00:00 2001
From 629e15f843d21d19603545bd1bcdb1e8609dc2a9 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Sat, 15 Nov 2014 20:12:48 -0500
Subject: [PATCH 03/10] platform.mk: avoid choking on i586
@@ -8,7 +8,7 @@ Subject: [PATCH 03/10] platform.mk: avoid choking on i586
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mk/platform.mk b/mk/platform.mk
index 78c1057..d28562c 100644
index ed50585..14221d7 100644
--- a/mk/platform.mk
+++ b/mk/platform.mk
@@ -14,7 +14,9 @@
@@ -23,5 +23,5 @@ index 78c1057..d28562c 100644
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_HOST_VAR,$(t))))
$(foreach t,$(CFG_TARGET),$(info cfg: host for $(t) is $(HOST_$(t))))
--
2.3.0
2.3.1
@@ -1,4 +1,4 @@
From 2aea9850a8bbeb51e3e0daed015843b00718bea1 Mon Sep 17 00:00:00 2001
From 5d06d2f437e94e4ece0a5fb2b03674d1424caff6 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 17 Nov 2014 16:14:15 -0500
Subject: [PATCH 04/10] mk/rt/compiler_rt: pass LDFLAGS from
@@ -21,5 +21,5 @@ index 527485c..21280be 100644
triple-builtins
$$(Q)cp $$(COMPRT_BUILD_DIR_$(1))/triple/builtins/libcompiler_rt.a $$(COMPRT_LIB_$(1))
--
2.3.0
2.3.1
@@ -1,26 +1,27 @@
From 6f53a8bd370f1e9984c49736219193bac8f9d9e5 Mon Sep 17 00:00:00 2001
From 46eeadcd2010498fcff6778b487d7bb32b7b9aa4 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 01:40:21 -0500
Subject: [PATCH 05/10] Target: add default target.json path:
$libdir/rust/targets
---
src/librustc/session/config.rs | 4 ++--
src/librustc/session/config.rs | 6 +++---
src/librustc/session/mod.rs | 8 ++++++--
src/librustc_back/target/mod.rs | 9 ++++++---
3 files changed, 14 insertions(+), 7 deletions(-)
src/librustc_back/target/mod.rs | 8 +++++---
3 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 93a25de..7897379 100644
index efcde8b..dba6f98 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -633,12 +633,12 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
@@ -637,12 +637,12 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
v
}
-pub fn build_target_config(opts: &Options, sp: &SpanHandler) -> Config {
- let target = match Target::search(&opts.target_triple) {
+pub fn build_target_config(sysroot: &Path, opts: &Options, sp: &SpanHandler) -> Config {
let target = match Target::search(&opts.target_triple[]) {
+ let target = match Target::search(sysroot, &opts.target_triple[]) {
Ok(t) => t,
Err(e) => {
sp.handler().fatal(&format!("Error loading target specification: {}", e));
@@ -28,12 +29,12 @@ index 93a25de..7897379 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
index c1c5518..2de99e7 100644
index 67c39bc..17a28a7 100644
--- a/src/librustc/session/mod.rs
+++ b/src/librustc/session/mod.rs
@@ -328,14 +328,18 @@ pub fn build_session_(sopts: config::Options,
@@ -336,14 +336,18 @@ pub fn build_session_(sopts: config::Options,
local_crate_source_file: Option<Path>,
span_diagnostic: diagnostic::SpanHandler)
-> Session {
@@ -55,16 +56,17 @@ index c1c5518..2de99e7 100644
let default_sysroot = match sopts.maybe_sysroot {
Some(_) => None,
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
index 01a5f0d..4f6a75b 100644
index d09a7c3..7bfabac 100644
--- a/src/librustc_back/target/mod.rs
+++ b/src/librustc_back/target/mod.rs
@@ -306,12 +306,13 @@ impl Target {
@@ -308,13 +308,14 @@ impl Target {
///
/// The error string could come from any of the APIs called, including filesystem access and
/// JSON decoding.
- pub fn search(target: &str) -> Result<Target, String> {
+ pub fn search(sysroot: &Path, target: &str) -> Result<Target, String> {
use std::env;
use std::os;
use std::ffi::OsString;
use std::old_io::File;
use std::old_path::Path;
@@ -73,7 +75,7 @@ index 01a5f0d..4f6a75b 100644
fn load_file(path: &Path) -> Result<Target, String> {
let mut f = try!(File::open(path).map_err(|e| format!("{:?}", e)));
@@ -391,9 +392,11 @@ impl Target {
@@ -395,9 +396,10 @@ impl Target {
let target_path = env::var_os("RUST_TARGET_PATH").unwrap_or(OsString::from_str(""));
@@ -81,12 +83,11 @@ index 01a5f0d..4f6a75b 100644
+ let paths = env::split_paths(&target_path)
+ .chain(Some(sysroot.join_many(&[env!("CFG_LIBDIR_RELATIVE"), "rustlib"])).into_iter());
- for dir in env::split_paths(&target_path) {
+
- for dir in os::split_paths(target_path.to_str().unwrap()).iter() {
+ for dir in paths {
let p = dir.join(path.clone());
if p.is_file() {
return load_file(&p);
--
2.3.0
2.3.1
@@ -1,4 +1,4 @@
From e34ddb7a1201fc552b6ed5f344b320518325d545 Mon Sep 17 00:00:00 2001
From e4c200fb686c77eea4e99e86368d66362c05e202 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 14:52:56 -0500
Subject: [PATCH 06/10] mk: for stage0, use RUSTFLAGS to override target libs
@@ -64,5 +64,5 @@ index 9752ee2..8f09d7c 100644
endef
--
2.3.0
2.3.1
@@ -1,4 +1,4 @@
From 0788fd7a54cc24aad08959230dab460eaa4429e8 Mon Sep 17 00:00:00 2001
From 3a906749e88538aa4b5755603cdc0345da38dbe8 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 13:48:14 -0500
Subject: [PATCH 07/10] mk: add missing CFG_LIBDIR_RELATIVE
@@ -23,5 +23,5 @@ index d9c66e2..585206d 100644
ifeq ($(CFG_OSTYPE),apple-darwin)
FLEX_LDFLAGS=-ll
--
2.3.0
2.3.1
@@ -1,4 +1,4 @@
From a6ad7db7efb8b3501e965a080be833933e11db85 Mon Sep 17 00:00:00 2001
From 5b549eb926d3bac9570a847774334548d1a5bd94 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:10:15 -0500
Subject: [PATCH 08/10] configure: support --bindir, and extend libdir to
@@ -13,18 +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
windows platforms
---
configure | 49 ++++++++++++++++-------
configure | 49 +++++++++++++++++------
mk/host.mk | 6 ++-
mk/main.mk | 11 ++++++
mk/main.mk | 11 +++++
mk/perf.mk | 4 +-
mk/prepare.mk | 4 +-
src/librustc/metadata/filesearch.rs | 78 ++++++++++++++-----------------------
src/librustc/session/config.rs | 2 +-
src/librustc/metadata/filesearch.rs | 80 ++++++++++++++-----------------------
src/librustc_trans/back/link.rs | 3 +-
8 files changed, 87 insertions(+), 70 deletions(-)
7 files changed, 87 insertions(+), 70 deletions(-)
diff --git a/configure b/configure
index d1b27a9..b8a89f0 100755
index e5333b4..cdd2b05 100755
--- a/configure
+++ b/configure
@@ -309,6 +309,31 @@ envopt() {
@@ -59,7 +58,7 @@ index d1b27a9..b8a89f0 100755
to_llvm_triple() {
case $1 in
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
@@ -562,23 +587,15 @@ CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
@@ -566,23 +591,15 @@ CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ]
then
CFG_LIBDIR_RELATIVE=bin
@@ -88,7 +87,7 @@ index d1b27a9..b8a89f0 100755
fi
if [ $HELP -eq 1 ]
@@ -587,6 +604,11 @@ then
@@ -591,6 +608,11 @@ then
exit 0
fi
@@ -100,7 +99,7 @@ index d1b27a9..b8a89f0 100755
# Validate Options
step_msg "validating $CFG_SELF args"
validate_opt
@@ -1344,6 +1366,7 @@ putvar CFG_PREFIX
@@ -1355,6 +1377,7 @@ putvar CFG_PREFIX
putvar CFG_HOST
putvar CFG_TARGET
putvar CFG_LIBDIR_RELATIVE
@@ -196,10 +195,10 @@ index f1c4aa6..37c0a1a 100644
prepare-base-$(1): PREPARE_DEST_MAN_DIR=$$(PREPARE_DEST_DIR)/share/man/man1
prepare-base-$(1): prepare-everything-$(1)
diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
index 3caa0f5..39dafa2 100644
index a8d39f9..836bb6b 100644
--- a/src/librustc/metadata/filesearch.rs
+++ b/src/librustc/metadata/filesearch.rs
@@ -67,8 +67,7 @@ impl<'a> FileSearch<'a> {
@@ -68,8 +68,7 @@ impl<'a> FileSearch<'a> {
if !found {
let rustpath = rust_path();
for path in &rustpath {
@@ -209,7 +208,7 @@ index 3caa0f5..39dafa2 100644
debug!("is {} in visited_dirs? {}", tlib_path.display(),
visited_dirs.contains(&tlib_path.as_vec().to_vec()));
@@ -154,7 +153,7 @@ impl<'a> FileSearch<'a> {
@@ -155,7 +154,7 @@ impl<'a> FileSearch<'a> {
// Returns a list of directories where target-specific tool binaries are located.
pub fn get_tools_search_paths(&self) -> Vec<Path> {
let mut p = Path::new(self.sysroot);
@@ -218,7 +217,7 @@ index 3caa0f5..39dafa2 100644
p.push(rustlibdir());
p.push(self.triple);
p.push("bin");
@@ -162,8 +161,8 @@ impl<'a> FileSearch<'a> {
@@ -163,8 +162,8 @@ impl<'a> FileSearch<'a> {
}
}
@@ -229,7 +228,7 @@ index 3caa0f5..39dafa2 100644
assert!(p.is_relative());
p.push(rustlibdir());
p.push(target_triple);
@@ -173,17 +172,24 @@ pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> Path {
@@ -174,17 +173,24 @@ pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> Path {
fn make_target_lib_path(sysroot: &Path,
target_triple: &str) -> Path {
@@ -258,11 +257,13 @@ index 3caa0f5..39dafa2 100644
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> {
@@ -195,7 +201,17 @@ pub fn get_or_default_sysroot() -> Path {
@@ -195,8 +201,18 @@ pub fn get_or_default_sysroot() -> Path {
})
}
match canonicalize(env::current_exe().ok()) {
- match canonicalize(os::self_exe_name()) {
- Some(mut p) => { p.pop(); p.pop(); p }
+ match canonicalize(env::current_exe().ok()) {
+ Some(mut p) => {
+ // Remove the exe name
+ p.pop();
@@ -277,7 +278,7 @@ index 3caa0f5..39dafa2 100644
None => panic!("can't determine value for sysroot")
}
}
@@ -252,45 +268,9 @@ pub fn rust_path() -> Vec<Path> {
@@ -253,45 +269,9 @@ pub fn rust_path() -> Vec<Path> {
env_rust_path
}
@@ -326,21 +327,8 @@ index 3caa0f5..39dafa2 100644
}
// The name of rustc's own place to organize libraries.
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 7897379..4b2ca89 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -634,7 +634,7 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
}
pub fn build_target_config(sysroot: &Path, opts: &Options, sp: &SpanHandler) -> Config {
- let target = match Target::search(&opts.target_triple[]) {
+ let target = match Target::search(sysroot, &opts.target_triple[]) {
Ok(t) => t,
Err(e) => {
sp.handler().fatal(&format!("Error loading target specification: {}", e));
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index ef849bb..57cc5c9 100644
index ea5001a..3050ff3 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -1004,11 +1004,10 @@ fn link_args(cmd: &mut Command,
@@ -348,7 +336,7 @@ index ef849bb..57cc5c9 100644
// addl_lib_search_paths
if sess.opts.cg.rpath {
- 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 install_prefix = option_env!("CFG_PREFIX").expect("CFG_PREFIX");
- let tlib = filesearch::relative_target_lib_path(sysroot, target_triple);
@@ -357,5 +345,5 @@ index ef849bb..57cc5c9 100644
path.push(&tlib);
--
2.3.0
2.3.1
@@ -1,4 +1,4 @@
From 80aecbad6306514ce20222e7c542f7f51468be0e Mon Sep 17 00:00:00 2001
From 0f5a6c9b8707ff81813e0dcf75370e05ebafddbf Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:54:42 -0500
Subject: [PATCH 09/10] Parallelize submake invocations
@@ -118,5 +118,5 @@ index 3bbc8f4..4300b02 100644
S := $(CFG_SRC_DIR)
--
2.3.0
2.3.1
@@ -1,4 +1,4 @@
From 2d7aabfa767ccb88b81a1260cd4b8f25ddf6eddc Mon Sep 17 00:00:00 2001
From 52191bb8dd64d2ce70e0309198025f259658868b Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 3 Dec 2014 19:15:19 -0500
Subject: [PATCH 10/10] std/thread_local: workaround for NULL __dso_handle
@@ -8,10 +8,10 @@ Subject: [PATCH 10/10] std/thread_local: workaround for NULL __dso_handle
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs
index 2ed296e..c9beb04 100644
index 764c7d7..ae6a295 100644
--- a/src/libstd/thread_local/mod.rs
+++ b/src/libstd/thread_local/mod.rs
@@ -397,7 +397,7 @@ mod imp {
@@ -400,7 +400,7 @@ mod imp {
#[linkage = "extern_weak"]
static __cxa_thread_atexit_impl: *const ();
}
@@ -21,5 +21,5 @@ index 2ed296e..c9beb04 100644
arg: *mut u8,
dso_handle: *mut u8) -> libc::c_int;
--
2.3.0
2.3.1
+2 -2
View File
@@ -1,5 +1,5 @@
# 2015-02-21
SRCREV = "2b01a37ec38db9301239f0c0abcf3c695055b0ff"
# 2015-02-28
SRCREV = "e233987ce1de88a48db2ce612019ba644d3cf5dd"
require rust-git.inc
SRC_URI_append = "\