From 58ad43b0a9ad3a4256050136f6ca2a9af1a6c706 Mon Sep 17 00:00:00 2001 From: Zhang Junyang Date: Wed, 19 Mar 2025 13:53:41 +0800 Subject: [PATCH] Adjust feature selection --- Makefile | 6 +++++- osdk/src/base_crate/mod.rs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cbf5581b..4596d483 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,8 @@ LOG_LEVEL ?= error SCHEME ?= "" SMP ?= 1 OSTD_TASK_STACK_SIZE_IN_PAGES ?= 64 +FEATURES ?= +NO_DEFAULT_FEATURES ?= 0 # End of global build options. # GDB debugging and profiling options. @@ -33,7 +35,6 @@ GDB_PROFILE_INTERVAL ?= 0.1 AUTO_TEST ?= none EXTRA_BLOCKLISTS_DIRS ?= "" SYSCALL_TEST_DIR ?= /tmp -FEATURES ?= # End of auto test features. # Network settings @@ -93,6 +94,9 @@ endif ifdef FEATURES CARGO_OSDK_ARGS += --features="$(FEATURES)" endif +ifeq ($(NO_DEFAULT_FEATURES), 1) +CARGO_OSDK_ARGS += --no-default-features +endif # To test the linux-efi-handover64 boot protocol, we need to use Debian's # GRUB release, which is installed in /usr/bin in our Docker image. diff --git a/osdk/src/base_crate/mod.rs b/osdk/src/base_crate/mod.rs index 6918c8ab..388a7ed7 100644 --- a/osdk/src/base_crate/mod.rs +++ b/osdk/src/base_crate/mod.rs @@ -217,7 +217,7 @@ fn add_manifest_dependency( let dependencies = manifest.get_mut("dependencies").unwrap(); let target_dep = toml::Table::from_str(&format!( - "{} = {{ path = \"{}\", default-features = false }}", + "{} = {{ path = \"{}\" }}", crate_name, crate_path.as_ref().display() ))