From 9ddba6768201e3cbffe8e5fc8b7353e4f48dfda4 Mon Sep 17 00:00:00 2001 From: Wenfeng Wang Date: Fri, 16 Aug 2024 03:16:16 +0000 Subject: [PATCH] set default value of env TARGET_CC --- methods/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/methods/build.rs b/methods/build.rs index 11130e5..ef087eb 100644 --- a/methods/build.rs +++ b/methods/build.rs @@ -22,6 +22,11 @@ const SOLIDITY_IMAGE_ID_PATH: &str = "../contracts/ImageID.sol"; const SOLIDITY_ELF_PATH: &str = "../tests/Elf.sol"; fn main() { + // If TARGET_CC hasn't been set, set to clang as default + if env::var("TARGET_CC").is_err() { + env::set_var("TARGET_CC", "clang"); + } + // Builds can be made deterministic, and thereby reproducible, by using Docker to build the // guest. Check the RISC0_USE_DOCKER variable and use Docker to build the guest if set. let use_docker = env::var("RISC0_USE_DOCKER").ok().map(|_| DockerOptions {