From 49eaf6dbfc45521b20d8e5b1d3207cc05bf2d578 Mon Sep 17 00:00:00 2001 From: godsfryingpan Date: Mon, 23 Mar 2026 10:08:35 -0600 Subject: [PATCH] Enable compilers other than gcc (#6) issue: #1 Reviewed-on: http://192.168.1.227:3000/sfrembling/pallet/pulls/6 Co-authored-by: godsfryingpan Co-committed-by: godsfryingpan --- src/app.rs | 2 +- src/config.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 95ca391..6e9b5d5 100644 --- a/src/app.rs +++ b/src/app.rs @@ -274,7 +274,7 @@ fn build(mode: &Option, force_recompile: bool) -> std::io::Result<()> { } } - let mut command = Command::new("gcc"); + let mut command = Command::new(conf.compiler.as_deref().unwrap_or("gcc")); for arg in &build_config.args { command.arg(arg); diff --git a/src/config.rs b/src/config.rs index 518f671..00fe400 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,5 +1,7 @@ #[derive(serde::Deserialize, serde::Serialize, Default)] pub struct Config { + /// The C compiler to use (defaults to "gcc") + pub compiler: Option, /// The name of the output binary pub name: String, /// The default build to use