Browse Source

Merge pull request #213 from omh1280/remove_compile_library

Remove `compile_library`
cmd
Alex Crichton 8 years ago
committed by GitHub
parent
commit
7b6f4a0738
  1. 4
      README.md
  2. 18
      src/lib.rs

4
README.md

@ -35,7 +35,9 @@ Next up, you'll want to write a build script like so:
extern crate gcc;
fn main() {
gcc::compile_library("foo", &["foo.c", "bar.c"]);
gcc::Config::new()
.files(["foo.c", "bar.c"])
.compile("foo");
}
```

18
src/lib.rs

@ -10,28 +10,16 @@
//!
//! The purpose of this crate is to provide the utility functions necessary to
//! compile C code into a static archive which is then linked into a Rust crate.
//! The top-level [`compile_library`] function serves as a convenience. More
//! advanced configuration is available through the [`Config`] builder.
//! Configuration is available through the `Config` builder.
//!
//! This crate will automatically detect situations such as cross compilation or
//! other environment variables set by Cargo and will build code appropriately.
//!
//! [`compile_library`]: fn.compile_library.html
//! [`Config`]: struct.Config.html
//!
//! # Examples
//!
//! Use the default configuration:
//!
//! ```no_run
//! extern crate gcc;
//!
//! fn main() {
//! gcc::compile_library("foo", &["src/foo.c"]);
//! }
//! ```
//!
//! Use more advanced configuration:
//! Use the `Config` builder to compile `src/foo.c`:
//!
//! ```no_run
//! extern crate gcc;
@ -173,6 +161,8 @@ impl ToolFamily {
/// ```no_run
/// gcc::compile_library("foo", &["foo.c", "bar.c"]);
/// ```
#[deprecated]
#[doc(hidden)]
pub fn compile_library(output: &str, files: &[&str]) {
let mut c = Config::new();
for f in files.iter() {

Loading…
Cancel
Save