mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-12-01 21:22:13 +00:00
ea5ffed771
BUG=b:256951877 TEST=builds Change-Id: Iea6ab37489e87b1c8ca3c33fbf4a0d974a9b59ca Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4021591 Reviewed-by: Vikram Auradkar <auradkar@google.com> Commit-Queue: Noah Gold <nkgold@google.com>
20 lines
688 B
Rust
20 lines
688 B
Rust
// Copyright 2022 The ChromiumOS Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
use std::env;
|
|
use std::path::PathBuf;
|
|
|
|
fn main() {
|
|
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
build_protos(&PathBuf::from(manifest_dir));
|
|
}
|
|
|
|
fn build_protos(manifest_dir: &PathBuf) {
|
|
let mut event_details_path = manifest_dir.to_owned();
|
|
event_details_path.extend(["protos", "event_details.proto"]);
|
|
|
|
let mut out_dir = PathBuf::from(env::var("OUT_DIR").expect("OUT_DIR env does not exist."));
|
|
out_dir.push("metrics_protos");
|
|
proto_build_tools::build_protos(&out_dir, &[event_details_path]);
|
|
}
|