diff --git a/soc/riscv/riscv-privileged/common/CMakeLists.txt b/soc/riscv/riscv-privileged/common/CMakeLists.txt index 50ee91a2c3..d1ec3daceb 100644 --- a/soc/riscv/riscv-privileged/common/CMakeLists.txt +++ b/soc/riscv/riscv-privileged/common/CMakeLists.txt @@ -3,8 +3,9 @@ zephyr_include_directories(.) zephyr_sources( - idle.c soc_irq.S soc_common_irq.c vector.S ) + +zephyr_sources_ifdef(CONFIG_RISCV_HAS_CPU_IDLE idle.c)