[smart] rename the Group name to 'lwProcess' and optimize the error handling for vDSO building.

This commit is contained in:
bernard 2025-06-26 00:05:00 +08:00 committed by Rbb666
parent 492e33dd3c
commit 172676e115
4 changed files with 9 additions and 28 deletions

View File

@ -52,7 +52,7 @@ CPPPATH += ['./terminal/']
if not GetDepend(['LWP_USING_RUNTIME']):
SrcRemove(src, 'lwp_runtime.c')
group = DefineGroup('lwP', src, depend = ['RT_USING_SMART'], CPPPATH = CPPPATH)
group = DefineGroup('lwProcess', src, depend = ['RT_USING_SMART'], CPPPATH = CPPPATH)
group = group + SConscript(os.path.join('vdso', 'SConscript'))
Return('group')

View File

@ -1,11 +0,0 @@
# RT-Thread building script for component
from building import *
cwd = GetCurrentDir()
src = Glob('*.c') + Glob('*.S')
CPPPATH = [cwd]
group = DefineGroup('lwp-riscv', src, depend = ['RT_USING_SMART'], CPPPATH = CPPPATH)
Return('group')

View File

@ -1,11 +0,0 @@
# RT-Thread building script for component
from building import *
cwd = GetCurrentDir()
src = Glob('*.c') + Glob('*.S')
CPPPATH = [cwd]
group = DefineGroup('lwp-x86-i386', src, depend = ['RT_USING_SMART'], CPPPATH = CPPPATH)
Return('group')

View File

@ -35,12 +35,15 @@ else:
process_env['RTT_DEVICE'] = rtconfig.DEVICE
command = ["scons", "-C", vdso_arch]
clean_command = ["scons", "-C", vdso_arch, "--clean"]
if GetOption('clean'):
command = ["scons", "-C", vdso_arch, "--clean"]
if not GetOption('clean'):
try:
result = subprocess.run(command, env=process_env, check=True)
else:
result = subprocess.run(clean_command, env=process_env, check=True)
# generic error handle
except :
print('exec command: "%s" failed.' % ' '.join(command))
exit(1)
if result.returncode == 0:
print("Command executed successfully")
@ -48,5 +51,5 @@ else:
print("Command failed with exit code:", result.returncode)
exit(1)
group = DefineGroup('vDSO', src, depend = ['RT_USING_SMART','RT_USING_VDSO'], CPPPATH = CPPPATH)
group = DefineGroup('lwProcess', src, depend = ['RT_USING_SMART','RT_USING_VDSO'], CPPPATH = CPPPATH)
Return('group')