Skip to content

armgit / uzu

Public Imported from GitHub
0

A high-performance inference engine for AI models

tools: install clang-format in setup for the metal format check (#478)

Dmitry Barakhovc7858fe82327
diff --git a/crates/cli-tools/src/main.rs b/crates/cli-tools/src/main.rs
index b9c782cbc..831b371f9 100644
--- a/crates/cli-tools/src/main.rs
+++ b/crates/cli-tools/src/main.rs
@@ -70,6 +70,7 @@ fn run_setup(include_platform_specific: bool) -> Result<()> {
Command::xcodebuild_first_launch().run()?;
Command::xcodebuild_download_metal_toolchain().run()?;
Command::cmake_setup().run()?;
+ Command::clang_format_setup().run()?;
}
}
diff --git a/crates/cli-tools/src/types/command.rs b/crates/cli-tools/src/types/command.rs
index 1a74d1072..d88ad3c4f 100644
--- a/crates/cli-tools/src/types/command.rs
+++ b/crates/cli-tools/src/types/command.rs
@@ -413,6 +413,12 @@ impl Command {
Self::new("sh").with_argument("-c").with_argument("cmake --version >/dev/null 2>&1 || brew install cmake")
}
+ pub fn clang_format_setup() -> Self {
+ Self::new("sh")
+ .with_argument("-c")
+ .with_argument("clang-format --version >/dev/null 2>&1 || brew install clang-format")
+ }
+
pub fn xcodebuild_create_xcframework(
slice_libraries_with_headers_paths: Vec<(PathBuf, PathBuf)>,
output_path: PathBuf,