Skip to content

Commit

Permalink
Fixes for cfg flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
adetaylor committed May 7, 2024
1 parent 2d88789 commit 78cbeee
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ exclude = [ ".github", "book", "tools" ]
# where we are depending on such features.
resolver = "2"

[features]
arbitrary_self_types = []

[dependencies]
autocxx-macro = { path="macro", version="0.26.0" }
cxx = "1.0.78" # ... also needed because expansion of type_id refers to ::cxx
Expand Down
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// It would be nice to use the rustversion crate here instead,
// but that doesn't work with inner attributes.
fn main() {
println!("cargo::rustc-check-cfg=cfg(nightly)");
if let Some(ver) = rustc_version() {
if ver.contains("nightly") {
println!("cargo:rustc-cfg=nightly")
Expand Down
12 changes: 12 additions & 0 deletions integration-tests/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

fn main() {
println!("cargo::rustc-check-cfg=cfg(skip_windows_gnu_failing_tests)");
println!("cargo::rustc-check-cfg=cfg(skip_windows_msvc_failing_tests)");
}

0 comments on commit 78cbeee

Please sign in to comment.