From 57d002b25e26a5df950b087f0ea2dc7b6feeb7e3 Mon Sep 17 00:00:00 2001 From: Shell Date: Thu, 12 Sep 2024 11:14:12 +0800 Subject: feat: remove redundant codes under virt64, c906 Changes: - create new folder name `common64` and save all common codes of rv64 inside Signed-off-by: Shell --- libcpu/risc-v/SConscript | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libcpu/risc-v/SConscript') diff --git a/libcpu/risc-v/SConscript b/libcpu/risc-v/SConscript index 41549d03ee..0f3ce9f233 100644 --- a/libcpu/risc-v/SConscript +++ b/libcpu/risc-v/SConscript @@ -5,17 +5,16 @@ from building import * Import('rtconfig') +common64_arch = ['virt64', 'c906'] cwd = GetCurrentDir() group = [] list = os.listdir(cwd) # add common code files -if rtconfig.CPU == "virt64" : - group = group -elif rtconfig.CPU == "c906" : - group = group +if rtconfig.CPU in common64_arch : + group += SConscript(os.path.join('common64', 'SConscript')) else : - group = group + SConscript(os.path.join('common', 'SConscript')) + group += SConscript(os.path.join('common', 'SConscript')) # cpu porting code files if rtconfig.CPU == "c906": -- cgit v1.3.1