aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2021-09-15 03:04:21 -0700
committerEli Schwartz <eschwartz93@gmail.com>2021-10-04 22:34:57 -0400
commita161873948ec328848f9eec816d99cc52cd74631 (patch)
treee2a9a1edfe536a814896736e5a975d06877380c4
parenta1542720f43a52f00422913c8caa0556766815e7 (diff)
downloadmeson-a161873948ec328848f9eec816d99cc52cd74631.zip
meson-a161873948ec328848f9eec816d99cc52cd74631.tar.gz
meson-a161873948ec328848f9eec816d99cc52cd74631.tar.bz2
backend/vs: process link dependencies.
Partially-Fixes: #1799
-rw-r--r--mesonbuild/backend/vs2010backend.py10
-rw-r--r--test cases/common/144 link depends custom target/meson.build5
-rw-r--r--test cases/common/226 link depends indexed custom target/meson.build5
-rw-r--r--test cases/windows/10 vs module defs generated custom target/meson.build5
4 files changed, 10 insertions, 15 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index faeefbf..4cf6a5f 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 ee7a865..babd58a 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 c41c4c1..27f3a3f 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 fe594c8..7728ca7 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)