mirror of https://github.com/ARMmbed/mbed-os.git
Export command line for including mbed_conf.h from toolchains
parent
4f29483255
commit
5532fb8697
|
@ -114,11 +114,14 @@ class ARM(mbedToolchain):
|
|||
dep_path = base + '.d'
|
||||
return ["--depend", dep_path]
|
||||
|
||||
def get_config_option(self, config_header) :
|
||||
return ['--preinclude', config_header]
|
||||
|
||||
def get_compile_options(self, defines, includes):
|
||||
opts = ['-D%s' % d for d in defines] + ['--via', self.get_inc_file(includes)]
|
||||
config_header = self.get_config_header()
|
||||
if config_header is not None:
|
||||
opts = opts + ['--preinclude', config_header]
|
||||
opts = opts + self.get_config_option(config_header)
|
||||
return opts
|
||||
|
||||
@hook_tool
|
||||
|
|
|
@ -165,11 +165,14 @@ class GCC(mbedToolchain):
|
|||
dep_path = base + '.d'
|
||||
return ["-MD", "-MF", dep_path]
|
||||
|
||||
def get_config_option(self, config_header):
|
||||
return ['-include', config_header]
|
||||
|
||||
def get_compile_options(self, defines, includes):
|
||||
opts = ['-D%s' % d for d in defines] + ['@%s' % self.get_inc_file(includes)]
|
||||
config_header = self.get_config_header()
|
||||
if config_header is not None:
|
||||
opts = opts + ['-include', config_header]
|
||||
opts = opts + self.get_conifg_option(config_header)
|
||||
return opts
|
||||
|
||||
@hook_tool
|
||||
|
|
|
@ -126,8 +126,12 @@ class IAR(mbedToolchain):
|
|||
base, _ = splitext(object)
|
||||
return ["-l", base + '.s.txt']
|
||||
|
||||
def get_config_option(self, config_header):
|
||||
return ['--preinclude', config_header]
|
||||
|
||||
def get_compile_options(self, defines, includes, for_asm=False):
|
||||
opts = ['-D%s' % d for d in defines] + ['-f', self.get_inc_file(includes)]
|
||||
opts = ['-f', self.get_inc_file(includes)]
|
||||
config_header = self.get_config_header()
|
||||
if for_asm:
|
||||
# The assembler doesn't support '--preinclude', so we need to add
|
||||
# the macros directly
|
||||
|
@ -135,7 +139,7 @@ class IAR(mbedToolchain):
|
|||
else:
|
||||
config_header = self.get_config_header()
|
||||
if config_header is not None:
|
||||
opts = opts + ['--preinclude', config_header]
|
||||
opts = opts + self.get_config_option(config_header)
|
||||
return opts
|
||||
|
||||
@hook_tool
|
||||
|
|
Loading…
Reference in New Issue