Avoid forcing preprocessing

We avoid forcing preprocessing by not replacing the first line when it's
not a shebang (#!). Should work pretty darn well.
pull/4949/head
Jimmy Brisson 2017-08-22 09:20:35 -05:00
parent 06b00683c3
commit f4b7d8ba77
1 changed files with 2 additions and 1 deletions

View File

@ -191,7 +191,8 @@ class ARM(mbedToolchain):
"""
with open(scatter_file, "rb") as input:
lines = input.readlines()
if lines[0].startswith(self.SHEBANG):
if (lines[0].startswith(self.SHEBANG) or
not lines[0].startswith("#!")):
return scatter_file
else:
new_scatter = join(self.build_dir, ".link_script.sct")