diff options
-rwxr-xr-x | backends.py | 7 | ||||
-rwxr-xr-x | meson_install.py | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/backends.py b/backends.py index 29ee420..d237e76 100755 --- a/backends.py +++ b/backends.py @@ -21,8 +21,10 @@ from meson_install import InstallData if environment.is_windows(): quote_char = '"' + execute_wrapper = 'cmd /c' else: quote_char = "'" + execute_wrapper = '' def shell_quote(cmdlist): return ["'" + x + "'" for x in cmdlist] @@ -401,8 +403,9 @@ class NinjaBackend(Backend): for compiler in self.build.compilers: langname = compiler.get_language() rule = 'rule %s_LINKER\n' % langname - command = ' command = %s $FLAGS %s $out $in $LINK_FLAGS $aliasing\n' % \ - (' '.join(compiler.get_exelist()),\ + command = ' command = %s %s $FLAGS %s $out $in $LINK_FLAGS $aliasing\n' % \ + (execute_wrapper, + ' '.join(compiler.get_exelist()),\ ' '.join(compiler.get_output_flags())) description = ' description = Linking target $out' outfile.write(rule) diff --git a/meson_install.py b/meson_install.py index 5baffe5..229ce11 100755 --- a/meson_install.py +++ b/meson_install.py @@ -103,8 +103,14 @@ def install_targets(d): print('Stdout:\n%s\n' % stdo.decode()) print('Stderr:\n%s\n' % stde.decode()) sys.exit(1) + printed_symlink_error = False for alias in aliases: - os.symlink(fname, os.path.join(outdir, alias)) + try: + os.symlink(fname, os.path.join(outdir, alias)) + except NotImplementedError: + if not printed_symlink_error: + print("Symlink creation does not work on this platform.") + printed_symlink_error = True if is_elf_platform(): p = subprocess.Popen([d.depfixer, outname, d.dep_prefix], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |