diff options
Diffstat (limited to 'test cases/common/145 whole archive/meson.build')
-rw-r--r-- | test cases/common/145 whole archive/meson.build | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test cases/common/145 whole archive/meson.build b/test cases/common/145 whole archive/meson.build new file mode 100644 index 0000000..eadebf8 --- /dev/null +++ b/test cases/common/145 whole archive/meson.build @@ -0,0 +1,22 @@ +project('whole archive', 'c') + +cc = meson.get_compiler('c') + +if cc.get_id() == 'msvc' + if cc.version().version_compare('<19') + error('MESON_SKIP_TEST link_whole only works on VS2015 or newer.') + 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) + +test('prog', exe) + |