aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-08-07 20:42:34 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2018-08-09 18:39:19 +0300
commitc69030c123e32f1f11d3dfd02a69c4eb5932bf28 (patch)
treef0a3cfe2d2f3ac9c6c8ea8bc8edadbe5171ea65e /test cases
parentab01db177b58fb2b190f9b193b42f2c714322f59 (diff)
downloadmeson-c69030c123e32f1f11d3dfd02a69c4eb5932bf28.zip
meson-c69030c123e32f1f11d3dfd02a69c4eb5932bf28.tar.gz
meson-c69030c123e32f1f11d3dfd02a69c4eb5932bf28.tar.bz2
Don't require an import library for shared modules
Shared modules may be resource-only DLLs, or might automatically self-initialize using C constructors or WinMain at DLL load time. When an import library is not found for a shared module, just print a message about it instead of erroring out. Fixes #3965
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/125 shared module/installed_files.txt1
-rw-r--r--test cases/common/125 shared module/meson.build7
-rw-r--r--test cases/common/125 shared module/nosyms.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/test cases/common/125 shared module/installed_files.txt b/test cases/common/125 shared module/installed_files.txt
new file mode 100644
index 0000000..a351490
--- /dev/null
+++ b/test cases/common/125 shared module/installed_files.txt
@@ -0,0 +1 @@
+usr/lib/libnosyms.so
diff --git a/test cases/common/125 shared module/meson.build b/test cases/common/125 shared module/meson.build
index 08a284d..9f9ad63 100644
--- a/test cases/common/125 shared module/meson.build
+++ b/test cases/common/125 shared module/meson.build
@@ -11,3 +11,10 @@ m = shared_module('mymodule', 'module.c')
e = executable('prog', 'prog.c',
link_with : l, export_dynamic : true, dependencies : dl)
test('import test', e, args : m)
+
+# Shared module that does not export any symbols
+shared_module('nosyms', 'nosyms.c', install : true,
+ # Because we don't have cross-platform library support in
+ # installed_files.txt
+ name_suffix : 'so',
+ name_prefix : 'lib')
diff --git a/test cases/common/125 shared module/nosyms.c b/test cases/common/125 shared module/nosyms.c
new file mode 100644
index 0000000..3432b1c
--- /dev/null
+++ b/test cases/common/125 shared module/nosyms.c
@@ -0,0 +1,4 @@
+static int
+func_not_exported (void) {
+ return 99;
+}