mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 11:30:01 +08:00
[tools]Fix project compilation errors generated by mdk and iar
This commit is contained in:
@@ -87,6 +87,7 @@ def IARProject(target, script):
|
||||
|
||||
CPPPATH = []
|
||||
CPPDEFINES = []
|
||||
LOCAL_CPPDEFINES = []
|
||||
LINKFLAGS = ''
|
||||
CFLAGS = ''
|
||||
Libs = []
|
||||
@@ -115,6 +116,9 @@ def IARProject(target, script):
|
||||
if 'CPPDEFINES' in group and group['CPPDEFINES']:
|
||||
CPPDEFINES += group['CPPDEFINES']
|
||||
|
||||
if 'LOCAL_CPPDEFINES' in group and group['LOCAL_CPPDEFINES']:
|
||||
LOCAL_CPPDEFINES += group['LOCAL_CPPDEFINES']
|
||||
|
||||
# get each group's link flags
|
||||
if 'LINKFLAGS' in group and group['LINKFLAGS']:
|
||||
LINKFLAGS += group['LINKFLAGS']
|
||||
@@ -154,6 +158,10 @@ def IARProject(target, script):
|
||||
state = SubElement(option, 'state')
|
||||
state.text = define
|
||||
|
||||
for define in LOCAL_CPPDEFINES:
|
||||
state = SubElement(option, 'state')
|
||||
state.text = define
|
||||
|
||||
if name.text == 'IlinkAdditionalLibs':
|
||||
for path in Libs:
|
||||
state = SubElement(option, 'state')
|
||||
|
||||
+1
-1
@@ -186,7 +186,7 @@ def MDK4AddGroup(ProjectFiles, parent, name, files, project_path, group_scons):
|
||||
MiscControls_text = MiscControls_text + group_scons['LOCAL_CXXFLAGS']
|
||||
if 'LOCAL_CCFLAGS' in group_scons:
|
||||
MiscControls_text = MiscControls_text + group_scons['LOCAL_CCFLAGS']
|
||||
if MiscControls_text != ' ':
|
||||
if MiscControls_text != ' ' or ('LOCAL_CPPDEFINES' in group_scons):
|
||||
FileOption = SubElement(file, 'FileOption')
|
||||
FileArmAds = SubElement(FileOption, 'FileArmAds')
|
||||
Cads = SubElement(FileArmAds, 'Cads')
|
||||
|
||||
Reference in New Issue
Block a user