Skip to content

Commit

Permalink
chore: Declare ci_run flag in build.rs (#1071)
Browse files Browse the repository at this point in the history
Rust 1.80 will require pre-declaring configuration flags that we want to
set via RUSTFLAGS.
See the [blog
post](https://blog.rust-lang.org/2024/05/06/check-cfg.html).

Fixes #1067.
  • Loading branch information
aborgna-q authored May 17, 2024
1 parent fd90a2e commit 4d974cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hugr/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//! Build script for the `hugr` crate.
fn main() {
// We use a `ci_run` RUSTFLAG to indicate that we are running a CI check,
// so we can reject debug code using some tools defined in `utils.rs`.
println!("cargo:rustc-check-cfg=cfg(ci_run)");
}

0 comments on commit 4d974cf

Please sign in to comment.