Skip to content

Commit 172676e

Browse files
BernardXiongRbb666
authored andcommitted
[smart] rename the Group name to 'lwProcess' and optimize the error handling for vDSO building.
1 parent 492e33d commit 172676e

File tree

4 files changed

+9
-28
lines changed

4 files changed

+9
-28
lines changed

components/lwp/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ CPPPATH += ['./terminal/']
5252
if not GetDepend(['LWP_USING_RUNTIME']):
5353
SrcRemove(src, 'lwp_runtime.c')
5454

55-
group = DefineGroup('lwP', src, depend = ['RT_USING_SMART'], CPPPATH = CPPPATH)
55+
group = DefineGroup('lwProcess', src, depend = ['RT_USING_SMART'], CPPPATH = CPPPATH)
5656

5757
group = group + SConscript(os.path.join('vdso', 'SConscript'))
5858
Return('group')

components/lwp/arch/risc-v/rv64/SConscript

Lines changed: 0 additions & 11 deletions
This file was deleted.

components/lwp/arch/x86/i386/SConscript

Lines changed: 0 additions & 11 deletions
This file was deleted.

components/lwp/vdso/SConscript

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,21 @@ else:
3535
process_env['RTT_DEVICE'] = rtconfig.DEVICE
3636

3737
command = ["scons", "-C", vdso_arch]
38-
clean_command = ["scons", "-C", vdso_arch, "--clean"]
38+
if GetOption('clean'):
39+
command = ["scons", "-C", vdso_arch, "--clean"]
3940

40-
if not GetOption('clean'):
41+
try:
4142
result = subprocess.run(command, env=process_env, check=True)
42-
else:
43-
result = subprocess.run(clean_command, env=process_env, check=True)
43+
# generic error handle
44+
except :
45+
print('exec command: "%s" failed.' % ' '.join(command))
46+
exit(1)
4447

4548
if result.returncode == 0:
4649
print("Command executed successfully")
4750
else:
4851
print("Command failed with exit code:", result.returncode)
4952
exit(1)
5053

51-
group = DefineGroup('vDSO', src, depend = ['RT_USING_SMART','RT_USING_VDSO'], CPPPATH = CPPPATH)
54+
group = DefineGroup('lwProcess', src, depend = ['RT_USING_SMART','RT_USING_VDSO'], CPPPATH = CPPPATH)
5255
Return('group')

0 commit comments

Comments
 (0)