From a161873948ec328848f9eec816d99cc52cd74631 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 15 Sep 2021 03:04:21 -0700 Subject: [PATCH] backend/vs: process link dependencies. Partially-Fixes: #1799 --- mesonbuild/backend/vs2010backend.py | 10 ++++++++++ .../common/144 link depends custom target/meson.build | 5 ----- .../226 link depends indexed custom target/meson.build | 5 ----- .../meson.build | 5 ----- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index faeefbf6d..4cf6a5fb4 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -280,6 +280,16 @@ class Vs2010Backend(backends.Backend): all_deps[ldep.get_id()] = ldep.target else: all_deps[ldep.get_id()] = ldep + + for ldep in target.link_depends: + if isinstance(ldep, build.CustomTargetIndex): + all_deps[ldep.get_id()] = ldep.target + elif isinstance(ldep, File): + # Already built, no target references needed + pass + else: + all_deps[ldep.get_id()] = ldep + for obj_id, objdep in self.get_obj_target_deps(target.objects): all_deps[obj_id] = objdep else: diff --git a/test cases/common/144 link depends custom target/meson.build b/test cases/common/144 link depends custom target/meson.build index ee7a865d9..babd58ad0 100644 --- a/test cases/common/144 link depends custom target/meson.build +++ b/test cases/common/144 link depends custom target/meson.build @@ -1,10 +1,5 @@ project('link_depends_custom_target', 'c') -if meson.backend().startswith('vs') - # FIXME: Broken on the VS backends - error('MESON_SKIP_TEST see https://github.com/mesonbuild/meson/issues/1799') -endif - cmd = find_program('make_file.py') dep_file = custom_target('gen_dep', diff --git a/test cases/common/226 link depends indexed custom target/meson.build b/test cases/common/226 link depends indexed custom target/meson.build index c41c4c1e7..27f3a3fa1 100644 --- a/test cases/common/226 link depends indexed custom target/meson.build +++ b/test cases/common/226 link depends indexed custom target/meson.build @@ -1,10 +1,5 @@ project('link_depends_indexed_custom_target', 'c') -if meson.backend().startswith('vs') - # FIXME: Broken on the VS backends - error('MESON_SKIP_TEST see https://github.com/mesonbuild/meson/issues/1799') -endif - cmd = find_program('make_file.py') dep_files = custom_target('gen_dep', diff --git a/test cases/windows/10 vs module defs generated custom target/meson.build b/test cases/windows/10 vs module defs generated custom target/meson.build index fe594c878..7728ca77a 100644 --- a/test cases/windows/10 vs module defs generated custom target/meson.build +++ b/test cases/windows/10 vs module defs generated custom target/meson.build @@ -1,10 +1,5 @@ project('generated_dll_module_defs', 'c') -if meson.backend().startswith('vs') - # FIXME: Broken on the VS backends - error('MESON_SKIP_TEST see https://github.com/mesonbuild/meson/issues/1799') -endif - subdir('subdir') exe = executable('prog', 'prog.c', link_with : shlib) test('runtest', exe)