Skip to content

Commit ee00dbd

Browse files
committed
uvision - fix c/asm flags
Some flags are only C specific, causes problems when there's .S file in the workspace. For instance, -Ox is only C flag, causes a project to fail with "unrecognized option"
1 parent 9cef243 commit ee00dbd

File tree

1 file changed

+5
-5
lines changed
  • workspace_tools/toolchains

1 file changed

+5
-5
lines changed

workspace_tools/toolchains/arm.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class ARM(mbedToolchain):
3131
DEP_PATTERN = re.compile('\S+:\s(?P<file>.+)\n')
3232

3333
DEFAULT_FLAGS = {
34-
'common': ["-c", "--gnu", "-Otime", "--split_sections", "--apcs=interwork",
35-
"--brief_diagnostics", "--restrict", "--multibyte_chars"],
34+
'common': ["--apcs=interwork",
35+
"--brief_diagnostics"],
3636
'asm': ['-I%s' % ARM_INC],
37-
'c': ["--md", "--no_depend_system_headers", '-I%s' % ARM_INC,
37+
'c': ["-c", "--gnu", "-Otime", "--restrict", "--multibyte_chars", "--split_sections", "--md", "--no_depend_system_headers", '-I%s' % ARM_INC,
3838
"--c99", "-D__ASSERT_MSG" ],
3939
'cxx': ["--cpp", "--no_rtti", "-D__ASSERT_MSG"],
4040
'ld': [],
@@ -61,9 +61,9 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
6161

6262
if "debug-info" in self.options:
6363
self.flags['common'].append("-g")
64-
self.flags['common'].append("-O0")
64+
self.flags['c'].append("-O0")
6565
else:
66-
self.flags['common'].append("-O3")
66+
self.flags['c'].append("-O3")
6767

6868
self.asm = [main_cc] + self.flags['common'] + self.flags['asm']
6969
if not "analyze" in self.options:

0 commit comments

Comments
 (0)