diff options
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r-- | mesonbuild/backend/backends.py | 8 | ||||
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 44c3cae..e56d18d 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -617,8 +617,12 @@ class Backend: exe_wrapper = self.environment.cross_info.config['binaries'].get('exe_wrapper', None) else: exe_wrapper = None - if mesonlib.is_windows() or mesonlib.is_cygwin(): - extra_paths = self.determine_windows_extra_paths(exe, []) + if mesonlib.for_windows(is_cross, self.environment) or \ + mesonlib.for_cygwin(is_cross, self.environment): + extra_bdeps = [] + if isinstance(exe, build.CustomTarget): + extra_bdeps = exe.get_transitive_build_target_deps() + extra_paths = self.determine_windows_extra_paths(exe, extra_bdeps) else: extra_paths = [] cmd_args = [] diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index b327338..6082c85 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -530,7 +530,11 @@ int dummy; # the project, we need to set PATH so the DLLs are found. We use # a serialized executable wrapper for that and check if the # CustomTarget command needs extra paths first. - if mesonlib.is_windows() or mesonlib.is_cygwin(): + is_cross = self.environment.is_cross_build() and \ + self.environment.cross_info.need_cross_compiler() and \ + self.environment.cross_info.need_exe_wrapper() + if mesonlib.for_windows(is_cross, self.environment) or \ + mesonlib.for_cygwin(is_cross, self.environment): extra_bdeps = target.get_transitive_build_target_deps() extra_paths = self.determine_windows_extra_paths(target.command[0], extra_bdeps) if extra_paths: |