From 429794f25d720f824ce601e630922656140bee31 Mon Sep 17 00:00:00 2001 From: Zhouqi Jiang Date: Thu, 12 Dec 2024 14:23:36 +0800 Subject: [PATCH] rt: build: avoid declaring linker script path variable if no features selected Signed-off-by: Zhouqi Jiang --- bouffalo-rt/build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bouffalo-rt/build.rs b/bouffalo-rt/build.rs index db871b4..ad0b25d 100644 --- a/bouffalo-rt/build.rs +++ b/bouffalo-rt/build.rs @@ -2,6 +2,12 @@ use std::{env, path::PathBuf}; fn main() { let out = PathBuf::from(env::var_os("OUT_DIR").unwrap()); + #[cfg(any( + feature = "bl616", + feature = "bl808-mcu", + feature = "bl808-dsp", + feature = "bl702" + ))] let ld = &out.join("bouffalo-rt.ld"); #[cfg(feature = "bl616")]