Skip to content

Commit

Permalink
auto merge of #14157 : pcwalton/rust/detildestr-rustdoc, r=pcwalton
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed May 13, 2014
2 parents e8053b9 + 9ba91e1 commit 07d6322
Show file tree
Hide file tree
Showing 94 changed files with 2,372 additions and 1,701 deletions.
4 changes: 2 additions & 2 deletions src/librustc/back/archive.rs
Expand Up @@ -129,12 +129,12 @@ impl<'a> Archive<'a> {
}

/// Lists all files in an archive
pub fn files(&self) -> Vec<~str> {
pub fn files(&self) -> Vec<StrBuf> {
let output = run_ar(self.sess, "t", None, [&self.dst]);
let output = str::from_utf8(output.output.as_slice()).unwrap();
// use lines_any because windows delimits output with `\r\n` instead of
// just `\n`
output.lines_any().map(|s| s.to_owned()).collect()
output.lines_any().map(|s| s.to_strbuf()).collect()
}

fn add_archive(&mut self, archive: &Path, name: &str,
Expand Down
63 changes: 32 additions & 31 deletions src/librustc/back/arm.rs
Expand Up @@ -13,56 +13,57 @@ use driver::config::cfg_os_to_meta_os;
use metadata::loader::meta_section_name;
use syntax::abi;

pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
let cc_args = if target_triple.contains("thumb") {
vec!("-mthumb".to_owned())
pub fn get_target_strs(target_triple: StrBuf, target_os: abi::Os) -> target_strs::t {
let cc_args = if target_triple.as_slice().contains("thumb") {
vec!("-mthumb".to_strbuf())
} else {
vec!("-marm".to_owned())
vec!("-marm".to_strbuf())
};
return target_strs::t {
module_asm: "".to_owned(),
module_asm: "".to_strbuf(),

meta_sect_name: meta_section_name(cfg_os_to_meta_os(target_os)).to_owned(),
meta_sect_name:
meta_section_name(cfg_os_to_meta_os(target_os)).to_strbuf(),

data_layout: match target_os {
abi::OsMacos => {
"e-p:32:32:32".to_owned() +
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
"-f32:32:32-f64:64:64" +
"-v64:64:64-v128:64:128" +
"-a0:0:64-n32"
"e-p:32:32:32\
-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
-f32:32:32-f64:64:64\
-v64:64:64-v128:64:128\
-a0:0:64-n32".to_strbuf()
}

abi::OsWin32 => {
"e-p:32:32:32".to_owned() +
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
"-f32:32:32-f64:64:64" +
"-v64:64:64-v128:64:128" +
"-a0:0:64-n32"
"e-p:32:32:32\
-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
-f32:32:32-f64:64:64\
-v64:64:64-v128:64:128\
-a0:0:64-n32".to_strbuf()
}

abi::OsLinux => {
"e-p:32:32:32".to_owned() +
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
"-f32:32:32-f64:64:64" +
"-v64:64:64-v128:64:128" +
"-a0:0:64-n32"
"e-p:32:32:32\
-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
-f32:32:32-f64:64:64\
-v64:64:64-v128:64:128\
-a0:0:64-n32".to_strbuf()
}

abi::OsAndroid => {
"e-p:32:32:32".to_owned() +
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
"-f32:32:32-f64:64:64" +
"-v64:64:64-v128:64:128" +
"-a0:0:64-n32"
"e-p:32:32:32\
-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
-f32:32:32-f64:64:64\
-v64:64:64-v128:64:128\
-a0:0:64-n32".to_strbuf()
}

abi::OsFreebsd => {
"e-p:32:32:32".to_owned() +
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
"-f32:32:32-f64:64:64" +
"-v64:64:64-v128:64:128" +
"-a0:0:64-n32"
"e-p:32:32:32\
-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
-f32:32:32-f64:64:64\
-v64:64:64-v128:64:128\
-a0:0:64-n32".to_strbuf()
}
},

Expand Down

0 comments on commit 07d6322

Please sign in to comment.