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.

Mihail Stoyanov 2016-05-05 19:26:19 +01:00 committed by Mihail Stoyanov
parent ecb9651873
commit 868942a148
3 changed files with 33 additions and 45 deletions

View File

@ -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

View File

@ -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

View File

@ -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