mirror of https://github.com/ARMmbed/mbed-os.git
Only store references to one linker script in a resources object.
Projects have only ever made use of one linker script per compiler. However, the tools would store references to multiple linker scripts in a project and select one in a non-deterministic way. Now we clear out any existing linker script when we add a new one to a project. This way, the last added linker script is always used.pull/9966/head
parent
fd7467c9ba
commit
3b9baf9600
|
@ -269,6 +269,10 @@ class Resources(object):
|
||||||
if file_type:
|
if file_type:
|
||||||
if sep != self._sep:
|
if sep != self._sep:
|
||||||
file_name = file_name.replace(sep, self._sep)
|
file_name = file_name.replace(sep, self._sep)
|
||||||
|
# Mbed OS projects only use one linker script at a time, so remove
|
||||||
|
# any existing linker script when adding a new one
|
||||||
|
if file_type == FileType.LD_SCRIPT:
|
||||||
|
self._file_refs[file_type].clear()
|
||||||
self._file_refs[file_type].add(FileRef(file_name, file_path))
|
self._file_refs[file_type].add(FileRef(file_name, file_path))
|
||||||
|
|
||||||
def _include_file(self, ref):
|
def _include_file(self, ref):
|
||||||
|
|
Loading…
Reference in New Issue