| 1 |
project('staticlib rlib deps', 'c', 'rust', meson_version: '>=1.3.0') |
| 2 |
|
| 3 |
# This rlib is a dependency of the staticlib below. |
| 4 |
# When linking the C executable with the staticlib, the rlib should NOT |
| 5 |
# appear in the link command because it's already compiled into the staticlib. |
| 6 |
lib = static_library('lib', 'lib.rs', rust_abi: 'rust') |
| 7 |
|
| 8 |
staticlib = static_library('staticlib', 'staticlib.rs', |
| 9 |
rust_abi: 'c', |
| 10 |
link_whole: lib, |
| 11 |
) |
| 12 |
|
| 13 |
exe = executable('main', 'main.c', link_with: staticlib) |
| 14 |
test('main', exe) |