aboutsummaryrefslogtreecommitdiff
path: root/azalea/build.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-01-30 00:02:36 +0500
committermat <git@matdoes.dev>2026-01-30 00:02:36 +0500
commit6c0be6913dd0bcbb7e17a3e2a4daa45fcc8f5103 (patch)
tree6e09534e5f9119da4bf0712560bde892b49b5384 /azalea/build.rs
parentb0d0bd17f5978abb4e69ce5391622799e2185992 (diff)
downloadazalea-drasl-6c0be6913dd0bcbb7e17a3e2a4daa45fcc8f5103.tar.xz
warn if pathfinder is running without optimizations, and other minor fixes
Diffstat (limited to 'azalea/build.rs')
-rw-r--r--azalea/build.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/azalea/build.rs b/azalea/build.rs
index faed1365..9dd6b738 100644
--- a/azalea/build.rs
+++ b/azalea/build.rs
@@ -1,6 +1,17 @@
use std::{env, process::Command};
fn main() {
+ check_nightly();
+
+ // save the optimization level, used by the pathfinder to warn if optimizations
+ // are off
+ println!(
+ "cargo::rustc-env=OPT_LEVEL={}",
+ env::var("OPT_LEVEL").unwrap()
+ );
+}
+
+fn check_nightly() {
// If using `rustup`, check the toolchain via `RUSTUP_TOOLCHAIN`
if let Ok(toolchain) = env::var("RUSTUP_TOOLCHAIN") {
if toolchain.contains("nightly") {