mirror of https://github.com/ARMmbed/mbed-os.git
Build system response files for all macros and includes. This also allows developers to check the response file after/during compile for the list of all macros and includes being used.
parent
ecb9651873
commit
868942a148
|
@ -119,9 +119,7 @@ class ARM(mbedToolchain):
|
|||
def get_compile_options(self, defines, includes):
|
||||
cmd = []
|
||||
|
||||
str = (' '.join(defines))+"|"+(' '.join(includes))
|
||||
if len(str) > 160:
|
||||
sum = md5(str).hexdigest()
|
||||
sum = md5(' '.join(includes)).hexdigest()
|
||||
options_file = join(self.temp_dir, "options_%s.txt" % sum)
|
||||
if not exists(options_file):
|
||||
with open(options_file, "wb") as f:
|
||||
|
@ -132,8 +130,6 @@ class ARM(mbedToolchain):
|
|||
string = " ".join(cmd_list).replace("\\", "/")
|
||||
f.write(string)
|
||||
cmd.extend(['--via', options_file])
|
||||
else:
|
||||
cmd.extend(['-D%s' % d for d in defines] + ['-I%s' % i for i in includes])
|
||||
|
||||
return cmd
|
||||
|
||||
|
|
|
@ -165,9 +165,7 @@ class GCC(mbedToolchain):
|
|||
def get_compile_options(self, defines, includes):
|
||||
cmd = []
|
||||
|
||||
str = (' '.join(defines))+"|"+(' '.join(includes))
|
||||
if len(str) > 160:
|
||||
sum = md5(str).hexdigest()
|
||||
sum = md5(' '.join(includes)).hexdigest()
|
||||
options_file = join(self.temp_dir, "options_%s.txt" % sum)
|
||||
if not exists(options_file):
|
||||
with open(options_file, "wb") as f:
|
||||
|
@ -178,8 +176,6 @@ class GCC(mbedToolchain):
|
|||
string = " ".join(cmd_list).replace("\\", "/")
|
||||
f.write(string)
|
||||
cmd.extend(['@%s' % options_file])
|
||||
else:
|
||||
cmd.extend(['-D%s' % d for d in defines] + ['-I%s' % i for i in includes])
|
||||
|
||||
return cmd
|
||||
|
||||
|
|
|
@ -107,9 +107,7 @@ class IAR(mbedToolchain):
|
|||
def get_compile_options(self, defines, includes):
|
||||
cmd = []
|
||||
|
||||
str = (' '.join(defines))+"|"+(' '.join(includes))
|
||||
if len(str) > 160:
|
||||
sum = md5(str).hexdigest()
|
||||
sum = md5(' '.join(includes)).hexdigest()
|
||||
options_file = join(self.temp_dir, "options_%s.txt" % sum)
|
||||
if not exists(options_file):
|
||||
with open(options_file, "wb") as f:
|
||||
|
@ -120,8 +118,6 @@ class IAR(mbedToolchain):
|
|||
string = " ".join(cmd_list).replace("\\", "/")
|
||||
f.write(string)
|
||||
cmd.extend(['-f', options_file])
|
||||
else:
|
||||
cmd.extend(['-D%s' % d for d in defines] + ['-I%s' % i for i in includes])
|
||||
|
||||
return cmd
|
||||
|
||||
|
|
Loading…
Reference in New Issue