Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ def DefineGroup(name, src, depend, **parameters):
group['name'] = name
group['path'] = group_path
if type(src) == type([]):
# remove duplicate elements from list
src = list(set(src))
# remove duplicate elements from list while preserving order
src = list(dict.fromkeys(src))
group['src'] = File(src)
else:
group['src'] = src
Expand Down
5 changes: 3 additions & 2 deletions tools/targets/iar.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ def searchLib(group):
print('not found LIB: ' + item)

# make relative path
paths = set()
paths = {}
for path in CPPPATH:
inc = _make_path_relative(project_path, os.path.normpath(path))
paths.add(inc) #.replace('\\', '/')
paths[inc] = None # 使用 dict 去重并保持插入顺序
paths = list(paths.keys())

# setting options
options = tree.findall('configuration/settings/data/option')
Expand Down