scx/rust/scx_utils/build.rs
David Vernet 2aa8bbc32d
utils: Export build ID values from rust scx_utils
We want schedulers to be able to print, log, etc the build ID of the
repository. To do this, we can use the vergen Cargo crate to generate
environment variables that contain values that we can export from scx_utils.

This patch update scx_utils accordingly to use vergen to generate build
ID output that can be printed from schedulers. A subsequent patch will
update scx_rusty to print this build ID value.

Signed-off-by: David Vernet <void@manifault.com>
2024-06-25 11:44:19 -05:00

17 lines
382 B
Rust

// Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2.
use vergen::EmitBuilder;
include!("src/builder.rs");
fn main() {
Builder::new().build();
EmitBuilder::builder()
.all_git()
.cargo_target_triple()
.emit()
.unwrap();
}