From 4d974cf040d1035910f94e3ce7c3db0956d89b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Fri, 17 May 2024 13:55:28 +0100 Subject: [PATCH] chore: Declare ci_run flag in build.rs (#1071) 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. --- hugr/build.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 hugr/build.rs diff --git a/hugr/build.rs b/hugr/build.rs new file mode 100644 index 000000000..385ec3d50 --- /dev/null +++ b/hugr/build.rs @@ -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)"); +}