mirror of https://github.com/ARMmbed/mbed-os.git
Remove flags safely in uvisions
parent
4965e61616
commit
fe1cd87724
|
@ -19,6 +19,7 @@ from project_generator_definitions.definitions import ProGenDef
|
||||||
|
|
||||||
from tools.export.exporters import Exporter, ExporterTargetsProperty
|
from tools.export.exporters import Exporter, ExporterTargetsProperty
|
||||||
from tools.targets import TARGET_MAP, TARGET_NAMES
|
from tools.targets import TARGET_MAP, TARGET_NAMES
|
||||||
|
from tools.utils import remove_if_in
|
||||||
|
|
||||||
# If you wish to add a new target, add it to project_generator_definitions, and then
|
# If you wish to add a new target, add it to project_generator_definitions, and then
|
||||||
# define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``)
|
# define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``)
|
||||||
|
@ -87,11 +88,11 @@ class Uvision4(Exporter):
|
||||||
+ self.flags['c_flags']
|
+ self.flags['c_flags']
|
||||||
+ self.flags['cxx_flags']))
|
+ self.flags['cxx_flags']))
|
||||||
# not compatible with c99 flag set in the template
|
# not compatible with c99 flag set in the template
|
||||||
project_data['misc']['c_flags'].remove("--c99")
|
remove_if_in(project_data['misc']['c_flags'], "--c99")
|
||||||
# cpp is not required as it's implicit for cpp files
|
# cpp is not required as it's implicit for cpp files
|
||||||
project_data['misc']['c_flags'].remove("--cpp")
|
remove_if_in(project_data['misc']['c_flags'], "--cpp")
|
||||||
# we want no-vla for only cxx, but it's also applied for C in IDE, thus we remove it
|
# we want no-vla for only cxx, but it's also applied for C in IDE, thus we remove it
|
||||||
project_data['misc']['c_flags'].remove("--no_vla")
|
remove_if_in(project_data['misc']['c_flags'], "--no_vla")
|
||||||
project_data['misc']['ld_flags'] = self.flags['ld_flags']
|
project_data['misc']['ld_flags'] = self.flags['ld_flags']
|
||||||
|
|
||||||
project_data['build_dir'] = project_data['build_dir'] + '\\' + 'uvision4'
|
project_data['build_dir'] = project_data['build_dir'] + '\\' + 'uvision4'
|
||||||
|
|
|
@ -19,6 +19,7 @@ from project_generator_definitions.definitions import ProGenDef
|
||||||
|
|
||||||
from tools.export.exporters import Exporter, ExporterTargetsProperty
|
from tools.export.exporters import Exporter, ExporterTargetsProperty
|
||||||
from tools.targets import TARGET_MAP, TARGET_NAMES
|
from tools.targets import TARGET_MAP, TARGET_NAMES
|
||||||
|
from tools.utils import remove_if_in
|
||||||
|
|
||||||
# If you wish to add a new target, add it to project_generator_definitions, and then
|
# If you wish to add a new target, add it to project_generator_definitions, and then
|
||||||
# define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``)
|
# define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``)
|
||||||
|
@ -83,14 +84,12 @@ class Uvision5(Exporter):
|
||||||
+ self.flags['c_flags']
|
+ self.flags['c_flags']
|
||||||
+ self.flags['cxx_flags']))
|
+ self.flags['cxx_flags']))
|
||||||
# not compatible with c99 flag set in the template
|
# not compatible with c99 flag set in the template
|
||||||
try:project_data['misc']['c_flags'].remove("--c99")
|
remove_if_in(project_data['misc']['c_flags'], "--c99")
|
||||||
except ValueError: pass
|
|
||||||
# cpp is not required as it's implicit for cpp files
|
# cpp is not required as it's implicit for cpp files
|
||||||
try:project_data['misc']['c_flags'].remove("--cpp")
|
remove_if_in(project_data['misc']['c_flags'], "--cpp")
|
||||||
except ValueError: pass
|
# we want no-vla for only cxx, but it's also applied for C in IDE, thus we remove it
|
||||||
# we want no-vla for only cxx, but it's also applied for C in IDE, thus we remove it=
|
remove_if_in(project_data['misc']['c_flags'], "--no_vla")
|
||||||
try:project_data['misc']['c_flags'].remove("--no_vla")
|
# not compatible with c99 flag set in the template
|
||||||
except ValueError: pass
|
|
||||||
project_data['misc']['ld_flags'] = self.flags['ld_flags']
|
project_data['misc']['ld_flags'] = self.flags['ld_flags']
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
|
|
|
@ -28,6 +28,10 @@ import json
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
def remove_if_in(lst, thing):
|
||||||
|
if thing in lst:
|
||||||
|
lst.remove(thing)
|
||||||
|
|
||||||
def compile_worker(job):
|
def compile_worker(job):
|
||||||
"""Standard task runner used for compiling
|
"""Standard task runner used for compiling
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue