解决__RT_KERNEL_SOURCE__宏没有定义

Signed-off-by: latercomer <latercomer@qq.com>
This commit is contained in:
latercomer 2025-03-16 16:58:33 +08:00 committed by Rbb666
parent 130b5ba653
commit e91131bc0d
1 changed files with 8 additions and 3 deletions

View File

@ -50,7 +50,12 @@ if GetDepend('RT_USING_HOOKLIST') == True:
elif rtconfig.PLATFORM in ['armcc']:
LOCAL_CFLAGS += ' --c99 --gnu'
group = DefineGroup('Kernel', src, depend=[''], CPPPATH=inc,
if rtconfig.CROSS_TOOL == 'msvc':
group = DefineGroup('Kernel', src, depend=[''], CPPPATH=inc,
LINKFLAGS=LINKFLAGS, LOCAL_CFLAGS=LOCAL_CFLAGS,
CPPDEFINES=['__RTTHREAD__', '__RT_KERNEL_SOURCE__'])
else:
group = DefineGroup('Kernel', src, depend=[''], CPPPATH=inc,
LINKFLAGS=LINKFLAGS, LOCAL_CFLAGS=LOCAL_CFLAGS,
CPPDEFINES=['__RTTHREAD__'], LOCAL_CPPDEFINES=['__RT_KERNEL_SOURCE__'])