mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #6487 from theotherjimmy/min-uvision-include
Minimize the size of uvision include pathspull/6494/head
commit
25a2d15f05
|
@ -259,6 +259,20 @@ class Exporter(object):
|
||||||
def all_supported_targets(cls):
|
def all_supported_targets(cls):
|
||||||
return [t for t in TARGET_MAP.keys() if cls.is_target_supported(t)]
|
return [t for t in TARGET_MAP.keys() if cls.is_target_supported(t)]
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def filter_dot(str):
|
||||||
|
"""
|
||||||
|
Remove the './' or '.\\' prefix, if present.
|
||||||
|
"""
|
||||||
|
if str == None:
|
||||||
|
return None
|
||||||
|
if str[:2] == './':
|
||||||
|
return str[2:]
|
||||||
|
if str[:2] == '.\\':
|
||||||
|
return str[2:]
|
||||||
|
return str
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def apply_supported_whitelist(compiler, whitelist, target):
|
def apply_supported_whitelist(compiler, whitelist, target):
|
||||||
"""Generate a list of supported targets for a given compiler and post-binary hook
|
"""Generate a list of supported targets for a given compiler and post-binary hook
|
||||||
|
|
|
@ -417,21 +417,6 @@ class GNUARMEclipse(Exporter):
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def filter_dot(str):
|
|
||||||
"""
|
|
||||||
Remove the './' prefix, if present.
|
|
||||||
This function assumes that resources.win_to_unix()
|
|
||||||
replaced all windows backslashes with slashes.
|
|
||||||
"""
|
|
||||||
if str == None:
|
|
||||||
return None
|
|
||||||
if str[:2] == './':
|
|
||||||
return str[2:]
|
|
||||||
return str
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
def dump_tree(self, nodes, depth=0):
|
def dump_tree(self, nodes, depth=0):
|
||||||
for k in nodes.keys():
|
for k in nodes.keys():
|
||||||
node = nodes[k]
|
node = nodes[k]
|
||||||
|
|
|
@ -215,7 +215,8 @@ class Uvision(Exporter):
|
||||||
# UVFile tuples defined above
|
# UVFile tuples defined above
|
||||||
'project_files': sorted(list(self.format_src(srcs).items()),
|
'project_files': sorted(list(self.format_src(srcs).items()),
|
||||||
key=lambda tuple: tuple[0].lower()),
|
key=lambda tuple: tuple[0].lower()),
|
||||||
'include_paths': '; '.join(self.resources.inc_dirs).encode('utf-8'),
|
'include_paths': ';'.join(self.filter_dot(d) for d in
|
||||||
|
self.resources.inc_dirs).encode('utf-8'),
|
||||||
'device': DeviceUvision(self.target),
|
'device': DeviceUvision(self.target),
|
||||||
}
|
}
|
||||||
sct_file = self.resources.linker_script
|
sct_file = self.resources.linker_script
|
||||||
|
|
Loading…
Reference in New Issue