build.rs 615 B

12345678910111213141516171819202122
  1. extern crate cc;
  2. // use std::env;
  3. fn main() {
  4. // let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
  5. //
  6. // cc::Build::new()
  7. // .flag("-nostdinc")
  8. // .flag("-nostdlib")
  9. // .flag("-I")
  10. // .flag(&format!("{}/include", crate_dir))
  11. // .flag("-fno-stack-protector")
  12. // .file("src/c/dlmalloc.c")
  13. // .file("src/c/fcntl.c")
  14. // .file("src/c/stack_chk.c")
  15. // .file("src/c/stdio.c")
  16. // .file("src/c/unistd.c")
  17. // .compile("relibc_c");
  18. println!("cargo:rustc-link-lib=static=relibc_c");
  19. }