summaryrefslogtreecommitdiffstats
path: root/test cases/common/5 linkstatic
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common/5 linkstatic')
-rw-r--r--test cases/common/5 linkstatic/libfile.c3
-rw-r--r--test cases/common/5 linkstatic/libfile2.c3
-rw-r--r--test cases/common/5 linkstatic/libfile3.c3
-rw-r--r--test cases/common/5 linkstatic/libfile4.c3
-rw-r--r--test cases/common/5 linkstatic/main.c5
-rw-r--r--test cases/common/5 linkstatic/meson.build6
6 files changed, 23 insertions, 0 deletions
diff --git a/test cases/common/5 linkstatic/libfile.c b/test cases/common/5 linkstatic/libfile.c
new file mode 100644
index 0000000..9180030
--- /dev/null
+++ b/test cases/common/5 linkstatic/libfile.c
@@ -0,0 +1,3 @@
+int func(void) {
+ return 0;
+}
diff --git a/test cases/common/5 linkstatic/libfile2.c b/test cases/common/5 linkstatic/libfile2.c
new file mode 100644
index 0000000..5badf23
--- /dev/null
+++ b/test cases/common/5 linkstatic/libfile2.c
@@ -0,0 +1,3 @@
+int func2(void) {
+ return 2;
+}
diff --git a/test cases/common/5 linkstatic/libfile3.c b/test cases/common/5 linkstatic/libfile3.c
new file mode 100644
index 0000000..4bfe52a
--- /dev/null
+++ b/test cases/common/5 linkstatic/libfile3.c
@@ -0,0 +1,3 @@
+int func3(void) {
+ return 3;
+}
diff --git a/test cases/common/5 linkstatic/libfile4.c b/test cases/common/5 linkstatic/libfile4.c
new file mode 100644
index 0000000..ce1fe68
--- /dev/null
+++ b/test cases/common/5 linkstatic/libfile4.c
@@ -0,0 +1,3 @@
+int func4(void) {
+ return 4;
+}
diff --git a/test cases/common/5 linkstatic/main.c b/test cases/common/5 linkstatic/main.c
new file mode 100644
index 0000000..128f2bb
--- /dev/null
+++ b/test cases/common/5 linkstatic/main.c
@@ -0,0 +1,5 @@
+int func(void);
+
+int main(void) {
+ return func();
+}
diff --git a/test cases/common/5 linkstatic/meson.build b/test cases/common/5 linkstatic/meson.build
new file mode 100644
index 0000000..1f02a5c
--- /dev/null
+++ b/test cases/common/5 linkstatic/meson.build
@@ -0,0 +1,6 @@
+project('static library linking test', 'c')
+
+lib = build_target('mylib', 'libfile.c', 'libfile2.c', 'libfile3.c', 'libfile4.c', target_type : 'static_library')
+exe = executable('prog', 'main.c', link_with : lib)
+
+test('runtest', exe)