Skip to content

Rename llvm_stable feature and remove references from docs. #501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 10, 2017
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rust:
- stable

env:
- CARGO_TARGET_DIR=/tmp/bindgen LLVM_VERSION=3.8 BINDGEN_FEATURES=llvm_stable
- CARGO_TARGET_DIR=/tmp/bindgen LLVM_VERSION=3.8 BINDGEN_FEATURES=__testing_only_llvm_stable
- CARGO_TARGET_DIR=/tmp/bindgen LLVM_VERSION=3.9 BINDGEN_FEATURES=

cache:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ that you aren't forgetting to document types and functions. CI will catch it if
you forget, but the turn around will be a lot slower ;)

```
$ cargo build --features "llvm_stable _docs"
$ cargo build --features docs_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the trailing _ was because leading ones weren't properly handled. Perhaps this should be testing_only_docs too?

```

## Testing
Expand All @@ -90,7 +90,7 @@ Run `cargo test` to compare generated Rust bindings to the expectations.
### Running All Tests

```
$ cargo test [--features llvm_stable]
$ cargo test [--all-features]
```

### Authoring New Tests
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ version = "0.29"
[features]
assert_no_dangling_items = []
default = ["logging"]
llvm_stable = []
__testing_only_llvm_stable = []
logging = ["env_logger", "log"]
static = []
# This feature only exists for CI -- don't use it!
Expand Down
2 changes: 1 addition & 1 deletion bindgen-integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ bindgen = { path = ".." }
gcc = "0.3"

[features]
llvm_stable = ["bindgen/llvm_stable"]
__testing_only_llvm_stable = ["bindgen/__testing_only_llvm_stable"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, cargo had issues with _ prefixed features, so we may need to change this to simply testing_only_llvm_stable. We'll see when travis CI results get in :)

2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn main() {
let bind_args: Vec<_> = env::args().collect();

let version = clang_version();
let expected_version = if cfg!(feature = "llvm_stable") {
let expected_version = if cfg!(feature = "__testing_only_llvm_stable") {
(3, 8)
} else {
(3, 9)
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn create_bindgen_builder(header: &PathBuf) -> Result<Option<Builder>, Error> {
.unwrap();
flags.extend(extra_flags.into_iter());
} else if line.contains("bindgen-unstable") &&
cfg!(feature = "llvm_stable") {
cfg!(feature = "__testing_only_llvm_stable") {
return Ok(None);
} else if line.contains("bindgen-osx-only") {
let prepend_flags = ["--raw-line", "#![cfg(target_os=\"macos\")]"];
Expand Down