diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-01-26 13:51:23 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-01-30 09:51:06 +0000 |
commit | 0626465ea8aa65b10776d5c4064e881fe0d6fa25 (patch) | |
tree | be11f7029bd7bd418494d45cf7f3de52cbaf435f /mesonbuild/modules/hotdoc.py | |
parent | c321339b24f896d02b0839d1b1e5008eae405858 (diff) | |
download | meson-0626465ea8aa65b10776d5c4064e881fe0d6fa25.zip meson-0626465ea8aa65b10776d5c4064e881fe0d6fa25.tar.gz meson-0626465ea8aa65b10776d5c4064e881fe0d6fa25.tar.bz2 |
Fix executable as script on Windows
On Windows this would fail because of missing DLL:
```
mylib = library(...)
exe = executable(..., link_with: mylib)
meson.add_install_script(exe)
```
The reason is on Windows we cannot rely on rpath to find libraries from
build directory, they are searched in $PATH. We already have all that
mechanism in place for custom_target() using ExecutableSerialisation
class, so reuse it for install/dist/postconf scripts too.
This has bonus side effect to also use exe_wrapper for those scripts.
Fixes: #8187
Diffstat (limited to 'mesonbuild/modules/hotdoc.py')
-rw-r--r-- | mesonbuild/modules/hotdoc.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py index 931db12..eda411c 100644 --- a/mesonbuild/modules/hotdoc.py +++ b/mesonbuild/modules/hotdoc.py @@ -350,7 +350,7 @@ class HotdocTargetBuilder: install_script = None if install is True: - install_script = HotdocRunScript(self.build_command, [ + install_script = self.state.backend.get_executable_serialisation(self.build_command + [ "--internal", "hotdoc", "--install", os.path.join(fullname, 'html'), '--name', self.name, @@ -391,11 +391,6 @@ class HotdocTarget(build.CustomTarget): return res -class HotdocRunScript(build.RunScript): - def __init__(self, script, args): - super().__init__(script, args) - - class HotDocModule(ExtensionModule): @FeatureNew('Hotdoc Module', '0.48.0') def __init__(self, interpreter): |