Skip to content

Commit 57d002b

Browse files
polarvidmysterywolf
authored andcommitted
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 <[email protected]>
1 parent 2d026a3 commit 57d002b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+16
-4614
lines changed

libcpu/risc-v/SConscript

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ from building import *
55

66
Import('rtconfig')
77

8+
common64_arch = ['virt64', 'c906']
89
cwd = GetCurrentDir()
910
group = []
1011
list = os.listdir(cwd)
1112

1213
# add common code files
13-
if rtconfig.CPU == "virt64" :
14-
group = group
15-
elif rtconfig.CPU == "c906" :
16-
group = group
14+
if rtconfig.CPU in common64_arch :
15+
group += SConscript(os.path.join('common64', 'SConscript'))
1716
else :
18-
group = group + SConscript(os.path.join('common', 'SConscript'))
17+
group += SConscript(os.path.join('common', 'SConscript'))
1918

2019
# cpu porting code files
2120
if rtconfig.CPU == "c906":

libcpu/risc-v/common64/SConscript

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from building import *
2+
3+
cwd = GetCurrentDir()
4+
src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S')
5+
CPPPATH = [cwd]
6+
7+
if not GetDepend('ARCH_USING_ASID'):
8+
SrcRemove(src, ['asid.c'])
9+
10+
group = DefineGroup('libcpu', src, depend = [''], CPPPATH = CPPPATH)
11+
12+
Return('group')
File renamed without changes.

0 commit comments

Comments
 (0)