From 6195ad40c334a847cd01cd4adadf6b8f8d730908 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Mon, 29 Jun 2020 09:41:54 +0800 Subject: [PATCH] libsupport_zynq: make panic handler an optional feature --- libsupport_zynq/Cargo.toml | 3 +++ libsupport_zynq/src/lib.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/libsupport_zynq/Cargo.toml b/libsupport_zynq/Cargo.toml index 8921ac7..aff8b8b 100644 --- a/libsupport_zynq/Cargo.toml +++ b/libsupport_zynq/Cargo.toml @@ -8,6 +8,9 @@ edition = "2018" [features] target_zc706 = ["libboard_zynq/target_zc706"] target_cora_z7_10 = ["libboard_zynq/target_cora_z7_10"] +panic_handler = [] + +default = ["panic_handler"] [dependencies] r0 = "1" diff --git a/libsupport_zynq/src/lib.rs b/libsupport_zynq/src/lib.rs index c1e0a5e..04257c2 100644 --- a/libsupport_zynq/src/lib.rs +++ b/libsupport_zynq/src/lib.rs @@ -9,5 +9,6 @@ pub extern crate compiler_builtins; pub mod boot; mod abort; +#[cfg(feature = "panic_handler")] mod panic; pub mod ram;