Skip to content

Commit c13b80c

Browse files
committed
export: Corrections to Sw4STM32 after review
Add double quotes to linker command unconditionally.
1 parent 5b0fe22 commit c13b80c

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

tools/export/sw4stm32/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,9 @@ def generate(self):
371371

372372
preproc_cmd = ""
373373
# Hack for Windows. Build fails if command contains parentheses.
374-
if ('(' in self.toolchain.preproc[0] or ')' in self.toolchain.preproc[0]) and self.toolchain.preproc[0][0] != "'":
375-
preproc_cmd = '"' + \
376-
self.toolchain.preproc[0] + '"' + " " + \
377-
" ".join(self.toolchain.preproc[1:])
378-
else:
379-
preproc_cmd = " ".join(self.toolchain.preproc)
374+
preproc_cmd = '"' + \
375+
self.toolchain.preproc[0] + '"' + " " + \
376+
" ".join(self.toolchain.preproc[1:])
380377

381378
for id in ['debug', 'release']:
382379
opts = {}

tools/export/sw4stm32/makefile.targets.tmpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# DO NOT REMOVE! Generated by the SW4STM32 exporter from the mbed project.
22

3-
ifeq ($(strip $(PREPROC_CMD)),)
4-
PREPROC_CMD := {{cpp_cmd}}
5-
endif
3+
PREPROC_CMD ?= {{cpp_cmd}}
64

75
ldclean:
86
{% for config, opts in options.iteritems() %}

0 commit comments

Comments
 (0)