compilers: Convert args to cc.{links,run} from unix to native
This allows build files to pass -L and -l flags and have them converted automatically as needed.
This commit is contained in:
parent
35ef1d109a
commit
d87f2f5b42
|
@ -520,7 +520,8 @@ int main () {{ {1}; }}'''
|
|||
ofile = open(srcname, 'w')
|
||||
ofile.write(code)
|
||||
ofile.close()
|
||||
extra_args = extra_args + self.get_output_args(dstname)
|
||||
extra_args = self.unix_link_flags_to_native(extra_args) + \
|
||||
self.get_output_args(dstname)
|
||||
p = self.compile(code, srcname, extra_args)
|
||||
try:
|
||||
os.remove(dstname)
|
||||
|
@ -539,7 +540,7 @@ int main () {{ {1}; }}'''
|
|||
ofile.close()
|
||||
exename = srcname + '.exe' # Is guaranteed to be executable on every platform.
|
||||
commands = self.get_exelist()
|
||||
commands += extra_args
|
||||
commands += self.unix_link_flags_to_native(extra_args)
|
||||
commands.append(srcname)
|
||||
commands += self.get_output_args(exename)
|
||||
p = subprocess.Popen(commands, cwd=os.path.split(srcname)[0], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
|
Loading…
Reference in New Issue