aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-11-28 03:04:39 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-12-02 02:07:19 +0530
commit62ba5ca1ec1b9423b2fe6676dd163e2a06a7b0a5 (patch)
tree129bbe84d8360da562aca8cd300fa088d5d9527c /mesonbuild/backend/vs2010backend.py
parente1bdc098ca48990322b058e2a2a9fce16c3e7674 (diff)
downloadmeson-62ba5ca1ec1b9423b2fe6676dd163e2a06a7b0a5.zip
meson-62ba5ca1ec1b9423b2fe6676dd163e2a06a7b0a5.tar.gz
meson-62ba5ca1ec1b9423b2fe6676dd163e2a06a7b0a5.tar.bz2
custom target: Consider all build depends while serializing
Currently, we only consider the build depends of the Executable being run when serializing custom targets. However, this is not always sufficient, for example if the executable loads modules at runtime or if the executable is actually a python script that loads a built module. For these cases, we need to set PATH on Windows correctly or the custom target will fail to run at build time complaining about missing DLLs.
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r--mesonbuild/backend/vs2010backend.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index ea02580..e872a04 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -429,9 +429,12 @@ class Vs2010Backend(backends.Backend):
# Always use a wrapper because MSBuild eats random characters when
# there are many arguments.
tdir_abs = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target))
+ extra_bdeps = target.get_transitive_build_target_deps()
+ extra_paths = self.determine_windows_extra_paths(target.command[0], extra_bdeps)
exe_data = self.serialize_executable(target.command[0], cmd[1:],
# All targets run from the target dir
tdir_abs,
+ extra_paths=extra_paths,
capture=ofilenames[0] if target.capture else None)
wrapper_cmd = self.environment.get_build_command() + ['--internal', 'exe', exe_data]
ET.SubElement(customstep, 'Command').text = ' '.join(self.quote_arguments(wrapper_cmd))