Skip to content

Commit e91131b

Browse files
ComerLaterRbb666
authored andcommitted
解决__RT_KERNEL_SOURCE__宏没有定义
Signed-off-by: latercomer <[email protected]>
1 parent 130b5ba commit e91131b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/SConscript

+8-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,14 @@ if GetDepend('RT_USING_HOOKLIST') == True:
5050
elif rtconfig.PLATFORM in ['armcc']:
5151
LOCAL_CFLAGS += ' --c99 --gnu'
5252

53-
group = DefineGroup('Kernel', src, depend=[''], CPPPATH=inc,
54-
LINKFLAGS=LINKFLAGS, LOCAL_CFLAGS=LOCAL_CFLAGS,
55-
CPPDEFINES=['__RTTHREAD__'], LOCAL_CPPDEFINES=['__RT_KERNEL_SOURCE__'])
53+
if rtconfig.CROSS_TOOL == 'msvc':
54+
group = DefineGroup('Kernel', src, depend=[''], CPPPATH=inc,
55+
LINKFLAGS=LINKFLAGS, LOCAL_CFLAGS=LOCAL_CFLAGS,
56+
CPPDEFINES=['__RTTHREAD__', '__RT_KERNEL_SOURCE__'])
57+
else:
58+
group = DefineGroup('Kernel', src, depend=[''], CPPPATH=inc,
59+
LINKFLAGS=LINKFLAGS, LOCAL_CFLAGS=LOCAL_CFLAGS,
60+
CPPDEFINES=['__RTTHREAD__'], LOCAL_CPPDEFINES=['__RT_KERNEL_SOURCE__'])
5661

5762
list = os.listdir(cwd)
5863
for item in list:

0 commit comments

Comments
 (0)