summaryrefslogtreecommitdiff
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/main.c5
-rw-r--r--test cases/common/5 linkstatic/meson.build5
3 files changed, 13 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 000000000..6f1c172d6
--- /dev/null
+++ b/test cases/common/5 linkstatic/libfile.c
@@ -0,0 +1,3 @@
+int func() {
+ return 0;
+}
diff --git a/test cases/common/5 linkstatic/main.c b/test cases/common/5 linkstatic/main.c
new file mode 100644
index 000000000..8aadb0c7c
--- /dev/null
+++ b/test cases/common/5 linkstatic/main.c
@@ -0,0 +1,5 @@
+int func();
+
+int main(int argc, char **arg) {
+ 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 000000000..8c8aebcfa
--- /dev/null
+++ b/test cases/common/5 linkstatic/meson.build
@@ -0,0 +1,5 @@
+project('static library linking test', 'c')
+lib = static_library('mylib', 'libfile.c')
+exe = executable('prog', 'main.c', link_with : lib)
+
+add_test('runtest', exe)