diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-06-12 08:46:21 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2024-02-26 10:03:52 -0500 |
commit | 435e881c18cda15fc4f8fc9e42f566cdc86cd791 (patch) | |
tree | d913ae2b2e5fbad49276a228e55fe10aa7b49b4c /test cases | |
parent | 4d55645c397e2f338a09ebd1f0f564c64b98dafa (diff) | |
download | meson-435e881c18cda15fc4f8fc9e42f566cdc86cd791.zip meson-435e881c18cda15fc4f8fc9e42f566cdc86cd791.tar.gz meson-435e881c18cda15fc4f8fc9e42f566cdc86cd791.tar.bz2 |
cargo: Call into meson subdir if it exists
This allows projects to manually add extra rust args and deps. This is
intended to replace build.rs logic.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/rust/22 cargo subproject/subprojects/foo-rs/meson/meson.build | 1 | ||||
-rw-r--r-- | test cases/rust/22 cargo subproject/subprojects/foo-rs/src/lib.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test cases/rust/22 cargo subproject/subprojects/foo-rs/meson/meson.build b/test cases/rust/22 cargo subproject/subprojects/foo-rs/meson/meson.build new file mode 100644 index 0000000..67c7b82 --- /dev/null +++ b/test cases/rust/22 cargo subproject/subprojects/foo-rs/meson/meson.build @@ -0,0 +1 @@ +extra_args += ['--cfg', 'feature="foo"'] diff --git a/test cases/rust/22 cargo subproject/subprojects/foo-rs/src/lib.rs b/test cases/rust/22 cargo subproject/subprojects/foo-rs/src/lib.rs index 4f0a310..1c8cbc9 100644 --- a/test cases/rust/22 cargo subproject/subprojects/foo-rs/src/lib.rs +++ b/test cases/rust/22 cargo subproject/subprojects/foo-rs/src/lib.rs @@ -2,6 +2,7 @@ extern "C" { fn extra_func() -> i32; } +#[cfg(feature = "foo")] #[no_mangle] pub extern "C" fn rust_func() -> i32 { let v: i32; |