Remove std from outputted libc.a

This commit is contained in:
Jeremy Soller
2018-03-03 09:19:25 -07:00
parent d20e3f69e1
commit d337caafe6
5 changed files with 22 additions and 12 deletions
+10
View File
@@ -16,3 +16,13 @@ members = [
[dependencies]
fcntl = { path = "fcntl" }
unistd = { path = "unistd" }
[profile.dev]
incremental = false
lto = true
panic = "abort"
[profile.release]
incremental = false
lto = true
panic = "abort"
+1 -1
View File
@@ -8,4 +8,4 @@ build = "build.rs"
cbindgen = "0.5"
[dependencies]
libc = "0.2"
libc = { version = "0.2", default-features = false }
+5 -5
View File
@@ -1,11 +1,11 @@
extern crate cbindgen;
use std::env;
use std::{env, fs};
fn main() {
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
fs::create_dir_all("../target/include").expect("failed to create include directory");
cbindgen::generate(crate_dir)
.expect("Unable to generate bindings")
.write_to_file("../target/fcntl.h");
.expect("failed to generate bindings")
.write_to_file("../target/include/fcntl.h");
}
+1 -1
View File
@@ -8,4 +8,4 @@ build = "build.rs"
cbindgen = "0.5"
[dependencies]
libc = "0.2"
libc = { version = "0.2", default-features = false }
+5 -5
View File
@@ -1,11 +1,11 @@
extern crate cbindgen;
use std::env;
use std::{env, fs};
fn main() {
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
fs::create_dir_all("../target/include").expect("failed to create include directory");
cbindgen::generate(crate_dir)
.expect("Unable to generate bindings")
.write_to_file("../target/unistd.h");
.expect("failed to generate bindings")
.write_to_file("../target/include/unistd.h");
}