mirror of https://github.com/ARMmbed/mbed-os.git
uvision exporter: Escape double quote in flags.
Without this fix macro defined as -DFOO="BAR" won't be correctly handled by uvision.pull/4366/head
parent
da9b8f3dee
commit
deaabf3123
|
@ -166,7 +166,7 @@ class Uvision(Exporter):
|
||||||
# Flag is invalid if set in template
|
# Flag is invalid if set in template
|
||||||
# Optimizations are also set in the template
|
# Optimizations are also set in the template
|
||||||
invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x)
|
invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x)
|
||||||
flags['c_flags'] = [flag for flag in c_flags if not invalid_flag(flag)]
|
flags['c_flags'] = [flag.replace('"','\\"') for flag in c_flags if not invalid_flag(flag)]
|
||||||
flags['c_flags'] = " ".join(flags['c_flags'])
|
flags['c_flags'] = " ".join(flags['c_flags'])
|
||||||
return flags
|
return flags
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue