Browse Source

Remove compile_library function

cmd
Ottavio Hartman 8 years ago
parent
commit
a761285174
  1. 4
      README.md
  2. 17
      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; extern crate gcc;
fn main() { fn main() {
gcc::compile_library("libfoo.a", &["foo.c", "bar.c"]); gcc::Config::new()
.files(["foo.c", "bar.c"])
.compile("libfoo.a");
} }
``` ```

17
src/lib.rs

@ -10,25 +10,14 @@
//! //!
//! The purpose of this crate is to provide the utility functions necessary to //! 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. //! 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 and more //! Configuration is available through the `Config` builder.
//! advanced configuration is available through the `Config` builder.
//! //!
//! This crate will automatically detect situations such as cross compilation or //! This crate will automatically detect situations such as cross compilation or
//! other environment variables set by Cargo and will build code appropriately. //! other environment variables set by Cargo and will build code appropriately.
//! //!
//! # Examples //! # Examples
//! //!
//! Use the default configuration: //! Use the `Config` builder to compile `src/foo.c`:
//!
//! ```no_run
//! extern crate gcc;
//!
//! fn main() {
//! gcc::compile_library("libfoo.a", &["src/foo.c"]);
//! }
//! ```
//!
//! Use more advanced configuration:
//! //!
//! ```no_run //! ```no_run
//! extern crate gcc; //! extern crate gcc;
@ -170,6 +159,8 @@ impl ToolFamily {
/// ```no_run /// ```no_run
/// gcc::compile_library("libfoo.a", &["foo.c", "bar.c"]); /// gcc::compile_library("libfoo.a", &["foo.c", "bar.c"]);
/// ``` /// ```
#[deprecated]
#[doc(hidden)]
pub fn compile_library(output: &str, files: &[&str]) { pub fn compile_library(output: &str, files: &[&str]) {
let mut c = Config::new(); let mut c = Config::new();
for f in files.iter() { for f in files.iter() {

Loading…
Cancel
Save