summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'src/SConscript')
-rw-r--r--src/SConscript9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/SConscript b/src/SConscript
index 0eda61b1ef..6d59365195 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -5,8 +5,13 @@ from building import *
src = Glob('*.c')
CPPPATH = [RTT_ROOT + '/include']
-if rtconfig.CROSS_TOOL == 'keil' and GetDepend('RT_USING_MODULE') == True:
- LINKFLAGS = ' --keep __rtmsym_* '
+if rtconfig.CROSS_TOOL == 'keil':
+ # add more link flags for module and components_init.
+ LINKFLAGS = ''
+ if GetDepend('RT_USING_MODULE'):
+ LINKFLAGS = ' --keep __rtmsym_* '
+ if GetDepend('RT_USING_COMPONENTS_INIT'):
+ LINKFLAGS = ' --keep __rt_init* '
else:
LINKFLAGS = ''