aboutsummaryrefslogtreecommitdiff
path: root/src/util/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/build.rs')
-rw-r--r--src/util/build.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/build.rs b/src/util/build.rs
new file mode 100644
index 00000000..a4e955b8
--- /dev/null
+++ b/src/util/build.rs
@@ -0,0 +1,8 @@
+use rustc_version::version;
+
+fn main() {
+ // Acquire the version of Rust used to compile, this is added as a label to
+ // the garage_build_info metric.
+ let v = version().unwrap();
+ println!("cargo:rustc-env=RUSTC_VERSION={v}");
+}