We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fcf4999 + 8d8cf1a commit cfdb72bCopy full SHA for cfdb72b
tools/toolchains/arm.py
@@ -638,11 +638,21 @@ def get_compile_options(self, defines, includes, for_asm=False):
638
return opts
639
640
def assemble(self, source, object, includes):
641
- cmd_pre = copy(self.asm)
+ # Preprocess first, then assemble
642
+ root, _ = splitext(object)
643
+ tempfile = root + '.E'
644
+
645
+ # Build preprocess assemble command
646
+ cmd_pre = copy(self.cc)
647
cmd_pre.extend(self.get_compile_options(
- self.get_symbols(True), includes, for_asm=True))
- cmd_pre.extend(["-o", object, source])
- return [cmd_pre]
648
+ self.get_symbols(True), includes, for_asm=False))
649
+ cmd_pre.extend(["-E", "-MT", object, "-o", tempfile, source])
650
651
+ # Build main assemble command
652
+ cmd = self.asm + ["-o", object, tempfile]
653
654
+ # Return command array, don't execute
655
+ return [cmd_pre, cmd]
656
657
def compile(self, cc, source, object, includes):
658
cmd = copy(cc)
0 commit comments