Files
wasmer/lib/compiler-cranelift/build.rs
Christoph Herzog 5109a407c4 WASIX Preparation
This commit extracts changes to core libraries made in the WASIX branch.

It is not reasonable to extract the partial commit history, so this is
just a batch commit.

The history will make a bit more sense again if we decide to merge the
WASIX branch with full commit history.
2022-12-16 11:47:04 +01:00

16 lines
473 B
Rust

//! Wasmer Cranelift compiler build script.
//!
//! Sets the git revsion? for $PURPOSE
//! TODO(syrus): explain what's happening here
use std::process::Command;
use std::str;
fn main() {
let git_rev = match Command::new("git").args(["rev-parse", "HEAD"]).output() {
Ok(output) => str::from_utf8(&output.stdout).unwrap().trim().to_string(),
Err(_) => env!("CARGO_PKG_VERSION").to_string(),
};
println!("cargo:rustc-env=GIT_REV={}", git_rev);
}