diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-08-04 17:34:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-04 17:34:28 -0500 |
commit | 39a88d366cde89c04a78e01f0147b94ff1e3eb6a (patch) | |
tree | 016800421600e538f2529496c55c64e09c2eea21 /src/options.rs | |
parent | de180c42e52d6b9236a11ba887a6896b4ffae819 (diff) | |
parent | f4763bc8d4754ee4f89b2ab29b45d4c18e14d647 (diff) |
Auto merge of #891 - fitzgen:fix-test-expectations, r=photoszzt
Fix test expectations
r? @photoszzt
cc @tmfink: I had to revert the target features commit because there were a bunch of compilation failures in the test expectations (we had another, earlier regression that accidentally made it so that we weren't compiling and running the test expectations in CI, so we didn't catch the target features PR's regressions).
Diffstat (limited to 'src/options.rs')
-rw-r--r-- | src/options.rs | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/options.rs b/src/options.rs index e2e1b277..f2ed5494 100644 --- a/src/options.rs +++ b/src/options.rs @@ -1,9 +1,7 @@ -use bindgen::{Builder, CodegenConfig, RUST_TARGET_STRINGS, RustTarget, builder}; +use bindgen::{Builder, CodegenConfig, builder}; use clap::{App, Arg}; -// use super::features::RUST_TARGET_STRINGS; use std::fs::File; use std::io::{self, Error, ErrorKind}; -use std::str::FromStr; /// Construct a new [`Builder`](./struct.Builder.html) from command line flags. pub fn builder_from_flags<I> @@ -11,10 +9,6 @@ pub fn builder_from_flags<I> -> Result<(Builder, Box<io::Write>, bool), io::Error> where I: Iterator<Item = String>, { - let rust_target_help = format!( - "Version of the Rust compiler to target. Valid options are: {:?}.", - RUST_TARGET_STRINGS); - let matches = App::new("bindgen") .version(env!("CARGO_PKG_VERSION")) .about("Generates Rust bindings from C/C++ headers.") @@ -167,10 +161,6 @@ pub fn builder_from_flags<I> .takes_value(true) .multiple(true) .number_of_values(1), - Arg::with_name("rust-target") - .long("rust-target") - .help(&rust_target_help) - .takes_value(true), Arg::with_name("static") .long("static-link") .help("Link to static library.") @@ -236,10 +226,6 @@ pub fn builder_from_flags<I> return Err(Error::new(ErrorKind::Other, "Header not found")); } - if let Some(rust_target) = matches.value_of("rust-target") { - builder = builder.rust_target(RustTarget::from_str(rust_target)?); - } - if let Some(bitfields) = matches.values_of("bitfield-enum") { for regex in bitfields { builder = builder.bitfield_enum(regex); @@ -351,6 +337,10 @@ pub fn builder_from_flags<I> builder = builder.ignore_methods(); } + if matches.is_present("unstable-rust") { + builder = builder.unstable_rust(true); + } + if matches.is_present("no-convert-floats") { builder = builder.no_convert_floats(); } |