Skip to content

Commit

Permalink
Merge pull request ARMmbed#10182 from lrusinowicz/armc6_assembler_win…
Browse files Browse the repository at this point in the history
…7_workaround

Workaround for ARMC6 Windows 7 assembler issue
  • Loading branch information
Cruz Monrreal II authored and Cruz Monrreal II committed Mar 26, 2019
2 parents 1adbc26 + 8d8cf1a commit 5fc9760
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tools/toolchains/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,11 +638,21 @@ def get_compile_options(self, defines, includes, for_asm=False):
return opts

def assemble(self, source, object, includes):
cmd_pre = copy(self.asm)
# Preprocess first, then assemble
root, _ = splitext(object)
tempfile = root + '.E'

# Build preprocess assemble command
cmd_pre = copy(self.cc)
cmd_pre.extend(self.get_compile_options(
self.get_symbols(True), includes, for_asm=True))
cmd_pre.extend(["-o", object, source])
return [cmd_pre]
self.get_symbols(True), includes, for_asm=False))
cmd_pre.extend(["-E", "-MT", object, "-o", tempfile, source])

# Build main assemble command
cmd = self.asm + ["-o", object, tempfile]

# Return command array, don't execute
return [cmd_pre, cmd]

def compile(self, cc, source, object, includes):
cmd = copy(cc)
Expand Down

0 comments on commit 5fc9760

Please sign in to comment.