Use extra_paths on Cygwin
Cygwin executables are still loaded by the Windows PE loader, so PATH needs to include any extra directories where required DLLs can be found. Cygwin uses a unix style ':'-separated PATH. os.pathsep is used correctly on extra_paths in meson_exe.py, but not in mesontest.py
This commit is contained in:
parent
cbc5064a67
commit
600f16f9f8
|
@ -252,7 +252,7 @@ class Backend:
|
|||
exe_wrapper = self.environment.cross_info.config['binaries'].get('exe_wrapper', None)
|
||||
else:
|
||||
exe_wrapper = None
|
||||
if mesonlib.is_windows():
|
||||
if mesonlib.is_windows() or mesonlib.is_cygwin():
|
||||
extra_paths = self.determine_windows_extra_paths(exe)
|
||||
else:
|
||||
extra_paths = []
|
||||
|
@ -481,7 +481,7 @@ class Backend:
|
|||
exe_wrapper = self.environment.cross_info.config['binaries'].get('exe_wrapper', None)
|
||||
else:
|
||||
exe_wrapper = None
|
||||
if mesonlib.is_windows():
|
||||
if mesonlib.is_windows() or mesonlib.is_cygwin():
|
||||
extra_paths = self.determine_windows_extra_paths(exe)
|
||||
else:
|
||||
extra_paths = []
|
||||
|
|
|
@ -492,7 +492,7 @@ 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 target.capture or (mesonlib.is_windows() and
|
||||
if target.capture or ((mesonlib.is_windows() or mesonlib.is_cygwin()) and
|
||||
self.determine_windows_extra_paths(target.command[0])):
|
||||
exe_data = self.serialise_executable(target.command[0], cmd[1:],
|
||||
# All targets are built from the build dir
|
||||
|
|
|
@ -202,7 +202,7 @@ class TestHarness:
|
|||
|
||||
child_env.update(test.env)
|
||||
if len(test.extra_paths) > 0:
|
||||
child_env['PATH'] += ';'.join([''] + test.extra_paths)
|
||||
child_env['PATH'] += os.pathsep.join([''] + test.extra_paths)
|
||||
|
||||
# If MALLOC_PERTURB_ is not set, or if it is set to an empty value,
|
||||
# (i.e., the test or the environment don't explicitly set it), set
|
||||
|
|
Loading…
Reference in New Issue