Browse Source

Bump to 0.1.7

add-rc-path 0.1.7
Alex Crichton 10 years ago
parent
commit
9904334cbf
  1. 2
      Cargo.toml
  2. 18
      src/lib.rs

2
Cargo.toml

@ -1,7 +1,7 @@
[package] [package]
name = "gcc" name = "gcc"
version = "0.1.6" version = "0.1.7"
authors = ["Alex Crichton <alex@alexcrichton.com>"] authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
repository = "https://github.com/alexcrichton/gcc-rs" repository = "https://github.com/alexcrichton/gcc-rs"

18
src/lib.rs

@ -1,7 +1,7 @@
#![allow(unstable)] #![allow(unstable)]
use std::io::Command; use std::old_io::Command;
use std::io::process::InheritFd; use std::old_io::process::InheritFd;
use std::default::Default; use std::default::Default;
/// Extra configuration to pass to gcc. /// Extra configuration to pass to gcc.
@ -101,7 +101,7 @@ pub fn compile_library(output: &str, config: &Config, files: &[&str]) {
let mut objects = Vec::new(); let mut objects = Vec::new();
for file in files.iter() { for file in files.iter() {
let obj = dst.join(*file).with_extension("o"); let obj = dst.join(*file).with_extension("o");
std::io::fs::mkdir_recursive(&obj.dir_path(), std::io::USER_RWX).unwrap(); std::old_io::fs::mkdir_recursive(&obj.dir_path(), std::old_io::USER_RWX).unwrap();
run(cmd.clone().arg(src.join(*file)).arg("-o").arg(&obj)); run(cmd.clone().arg(src.join(*file)).arg("-o").arg(&obj));
objects.push(obj); objects.push(obj);
} }
@ -196,12 +196,12 @@ fn ios_flags(target: &str) -> Vec<String> {
let sdk = match arch { let sdk = match arch {
ArchSpec::Device(arch) => { ArchSpec::Device(arch) => {
res.push("-arch"); res.push("-arch".to_string());
res.push(arch); res.push(arch.to_string());
"iphoneos" "iphoneos"
}, },
ArchSpec::Simulator(arch) => { ArchSpec::Simulator(arch) => {
res.push(arch); res.push(arch.to_string());
"iphonesimulator" "iphonesimulator"
} }
}; };
@ -218,8 +218,8 @@ fn ios_flags(target: &str) -> Vec<String> {
let sdk_path = String::from_utf8(sdk_path).unwrap(); let sdk_path = String::from_utf8(sdk_path).unwrap();
res.push("-isysroot"); res.push("-isysroot".to_string());
res.push(sdk_path.as_slice().trim()); res.push(sdk_path.trim().to_string());
res.iter().map(|s| s.to_string()).collect::<Vec<_>>() res
} }

Loading…
Cancel
Save