Recover gcc -> cc in build docs
authorPeter Marheine <peter@taricorp.net>
Mon, 8 Jan 2018 05:17:15 +0000 (16:17 +1100)
committerPeter Marheine <peter@taricorp.net>
Mon, 8 Jan 2018 05:17:15 +0000 (16:17 +1100)
First changed in 209513d8991e05049c1e78c6cdf14c0865f2dd16 which failed
to update the book and was replaced in
1271bb4de0c0e0a085be239c2418af9c673ffc87.

src/doc/src/reference/build-scripts.md

index 42113a1ffe21e911108ddeb1fb2aa87b2fe623d0..aa62140b8612d553269bb3d49f24e653110b9245 100644 (file)
@@ -373,24 +373,26 @@ portable, and standardized. For example, the build script could be written as:
 ```rust,ignore
 // build.rs
 
-// Bring in a dependency on an externally maintained `gcc` package which manages
+// Bring in a dependency on an externally maintained `cc` package which manages
 // invoking the C compiler.
-extern crate gcc;
+extern crate cc;
 
 fn main() {
-    gcc::compile_library("libhello.a", &["src/hello.c"]);
+    cc::Build::new()
+        .file("src/hello.c")
+        .compile("hello");
 }
 ```
 
-Add a build time dependency on the `gcc` crate with the following addition to
+Add a build time dependency on the `cc` crate with the following addition to
 your `Cargo.toml`:
 
 ```toml
 [build-dependencies]
-gcc = "0.3"
+gcc = "1.0"
 ```
 
-The [`gcc` crate](https://crates.io/crates/gcc) abstracts a range of build
+The [`cc` crate](https://crates.io/crates/cc) abstracts a range of build
 script requirements for C code:
 
 * It invokes the appropriate compiler (MSVC for windows, `gcc` for MinGW, `cc`
@@ -399,7 +401,7 @@ script requirements for C code:
   the compiler being used.
 * Other environment variables, such as `OPT_LEVEL`, `DEBUG`, etc., are all
   handled automatically.
-* The stdout output and `OUT_DIR` locations are also handled by the `gcc`
+* The stdout output and `OUT_DIR` locations are also handled by the `cc`
   library.
 
 Here we can start to see some of the major benefits of farming as much