aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-10-01 01:19:05 +0300
committerGitHub <noreply@github.com>2017-10-01 01:19:05 +0300
commitea5ae8ef27690fa1682b1f164cdbc96fab08e03d (patch)
treefc85bd5da68f61e2fc514a455d4d207957b546ca /test cases
parent68275b32e80147145cc78607f496255486fb9d92 (diff)
parent8cc52b5d4f70619e9dfc64ecb9644a5fd24ff224 (diff)
downloadmeson-ea5ae8ef27690fa1682b1f164cdbc96fab08e03d.zip
meson-ea5ae8ef27690fa1682b1f164cdbc96fab08e03d.tar.gz
meson-ea5ae8ef27690fa1682b1f164cdbc96fab08e03d.tar.bz2
Merge pull request #2313 from dcbaker/fix-2180
link_whole should be considered a source for targets
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/145 whole archive/allofme/meson.build1
-rw-r--r--test cases/common/145 whole archive/exe/meson.build2
-rw-r--r--test cases/common/145 whole archive/exe2/meson.build1
-rw-r--r--test cases/common/145 whole archive/meson.build20
-rw-r--r--test cases/common/145 whole archive/shlib/meson.build4
-rw-r--r--test cases/common/145 whole archive/stlib/meson.build1
-rw-r--r--test cases/common/145 whole archive/wholeshlib/meson.build1
7 files changed, 21 insertions, 9 deletions
diff --git a/test cases/common/145 whole archive/allofme/meson.build b/test cases/common/145 whole archive/allofme/meson.build
new file mode 100644
index 0000000..f5c2027
--- /dev/null
+++ b/test cases/common/145 whole archive/allofme/meson.build
@@ -0,0 +1 @@
+stlib = static_library('allofme', '../libfile.c')
diff --git a/test cases/common/145 whole archive/exe/meson.build b/test cases/common/145 whole archive/exe/meson.build
new file mode 100644
index 0000000..f47a246
--- /dev/null
+++ b/test cases/common/145 whole archive/exe/meson.build
@@ -0,0 +1,2 @@
+exe = executable('prog', '../prog.c',
+ link_with : dylib)
diff --git a/test cases/common/145 whole archive/exe2/meson.build b/test cases/common/145 whole archive/exe2/meson.build
new file mode 100644
index 0000000..5365f03
--- /dev/null
+++ b/test cases/common/145 whole archive/exe2/meson.build
@@ -0,0 +1 @@
+exe2 = executable('prog2', '../prog.c', link_with : dylib2)
diff --git a/test cases/common/145 whole archive/meson.build b/test cases/common/145 whole archive/meson.build
index eadebf8..617ae03 100644
--- a/test cases/common/145 whole archive/meson.build
+++ b/test cases/common/145 whole archive/meson.build
@@ -1,5 +1,7 @@
project('whole archive', 'c')
+add_project_arguments('-I' + meson.source_root(), language : 'c')
+
cc = meson.get_compiler('c')
if cc.get_id() == 'msvc'
@@ -8,15 +10,15 @@ if cc.get_id() == 'msvc'
endif
endif
-stlib = static_library('allofme', 'libfile.c')
-
-# Nothing in dylib.c uses func1, so the linker would throw it
-# away and thus linking the exe would fail.
-dylib = shared_library('shlib', 'dylib.c',
- link_whole : stlib)
-
-exe = executable('prog', 'prog.c',
- link_with : dylib)
+subdir('allofme')
+subdir('shlib')
+subdir('exe')
test('prog', exe)
+# link_whole only
+subdir('stlib')
+subdir('wholeshlib')
+subdir('exe2')
+
+test('prog2', exe2)
diff --git a/test cases/common/145 whole archive/shlib/meson.build b/test cases/common/145 whole archive/shlib/meson.build
new file mode 100644
index 0000000..34a1b78
--- /dev/null
+++ b/test cases/common/145 whole archive/shlib/meson.build
@@ -0,0 +1,4 @@
+# Nothing in dylib.c uses func1, so the linker would throw it
+# away and thus linking the exe would fail.
+dylib = shared_library('shlib', '../dylib.c',
+ link_whole : stlib)
diff --git a/test cases/common/145 whole archive/stlib/meson.build b/test cases/common/145 whole archive/stlib/meson.build
new file mode 100644
index 0000000..07a434e
--- /dev/null
+++ b/test cases/common/145 whole archive/stlib/meson.build
@@ -0,0 +1 @@
+static = static_library('static', '../dylib.c')
diff --git a/test cases/common/145 whole archive/wholeshlib/meson.build b/test cases/common/145 whole archive/wholeshlib/meson.build
new file mode 100644
index 0000000..69a1995
--- /dev/null
+++ b/test cases/common/145 whole archive/wholeshlib/meson.build
@@ -0,0 +1 @@
+dylib2 = shared_library('link_whole', link_whole : [stlib, static])