summaryrefslogtreecommitdiff
path: root/test cases/rust
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-03-22 23:40:52 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-03-24 20:56:06 +0200
commit8361da5c52e880225df50d209318ef2184c2dbb9 (patch)
treed6561a9ef4edd9a76f54a23773156a9d1ac7c70c /test cases/rust
parent3037ade41dc0cfc1cb84b0a668784c8d1af46987 (diff)
downloadmeson-8361da5c52e880225df50d209318ef2184c2dbb9.tar.gz
Fix setup so test suite runs with rustc + MSVC. Closes: 5099
Diffstat (limited to 'test cases/rust')
-rw-r--r--test cases/rust/5 polyglot static/meson.build10
1 files changed, 8 insertions, 2 deletions
diff --git a/test cases/rust/5 polyglot static/meson.build b/test cases/rust/5 polyglot static/meson.build
index 76dc7904e..1441367dc 100644
--- a/test cases/rust/5 polyglot static/meson.build
+++ b/test cases/rust/5 polyglot static/meson.build
@@ -1,10 +1,16 @@
project('static rust and c polyglot executable', 'c', 'rust')
deps = [
- meson.get_compiler('c').find_library('dl'),
+ meson.get_compiler('c').find_library('dl', required: false),
dependency('threads'),
]
+extra_winlibs = meson.get_compiler('c').get_id() == 'msvc' ? ['userenv.lib', 'ws2_32.lib'] : []
+
l = static_library('stuff', 'stuff.rs', rust_crate_type : 'staticlib', install : true)
-e = executable('prog', 'prog.c', dependencies: deps, link_with : l, install : true)
+e = executable('prog', 'prog.c',
+ dependencies: deps,
+ link_with : l,
+ link_args: extra_winlibs,
+ install : true)
test('polyglottest', e)