Skip to content

Commit f4b7d8b

Browse files
committed
Avoid forcing preprocessing
We avoid forcing preprocessing by not replacing the first line when it's not a shebang (#!). Should work pretty darn well.
1 parent 06b0068 commit f4b7d8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/toolchains/arm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ def correct_scatter_shebang(self, scatter_file):
191191
"""
192192
with open(scatter_file, "rb") as input:
193193
lines = input.readlines()
194-
if lines[0].startswith(self.SHEBANG):
194+
if (lines[0].startswith(self.SHEBANG) or
195+
not lines[0].startswith("#!")):
195196
return scatter_file
196197
else:
197198
new_scatter = join(self.build_dir, ".link_script.sct")

0 commit comments

Comments
 (0)