diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-04-19 00:30:29 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-04-19 00:32:02 +0530 |
commit | d87f2f5b427c1da74450bc6eb553f3dba6b3cbe0 (patch) | |
tree | 3606956677e9e92aa1c00568c0da277bd80b853d | |
parent | 35ef1d109a6a2ae0d8a285617c13e47e3e429d64 (diff) | |
download | meson-d87f2f5b427c1da74450bc6eb553f3dba6b3cbe0.zip meson-d87f2f5b427c1da74450bc6eb553f3dba6b3cbe0.tar.gz meson-d87f2f5b427c1da74450bc6eb553f3dba6b3cbe0.tar.bz2 |
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.
-rw-r--r-- | mesonbuild/compilers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 1915644..87bd0d5 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -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) |