diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-08-28 11:56:23 +0200 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-09-22 08:34:09 -0700 |
| commit | bc039faefbb7ea43a7fd70cdaca13e15224db896 (patch) | |
| tree | 89197705f020a2a5db63bf62f3b1bdcf259656d1 /test cases/rust | |
| parent | 0bb366b36131967579826d92f0733c301fd59565 (diff) | |
| download | meson-bc039faefbb7ea43a7fd70cdaca13e15224db896.tar.gz | |
rust: let doctests pick objects from dependencies
If a depedency includes object files, they have to be added to the doctest.
However, NinjaBackend was not running flatten_object_list on the doctest.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'test cases/rust')
| -rw-r--r-- | test cases/rust/27 objects/lib1-dylib.rs | 3 | ||||
| -rw-r--r-- | test cases/rust/27 objects/meson.build | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test cases/rust/27 objects/lib1-dylib.rs b/test cases/rust/27 objects/lib1-dylib.rs index 858b121f9..b5080e8f5 100644 --- a/test cases/rust/27 objects/lib1-dylib.rs +++ b/test cases/rust/27 objects/lib1-dylib.rs @@ -15,7 +15,8 @@ pub extern "C" fn c_func() } /// ``` -/// use lib12::rust_func; +/// #[cfg(not(nodep))] use lib12::rust_func; +/// #[cfg(nodep)] use lib12_nodep::rust_func; /// rust_func(); /// ``` pub fn rust_func() diff --git a/test cases/rust/27 objects/meson.build b/test cases/rust/27 objects/meson.build index d6732d343..ad9578a6e 100644 --- a/test cases/rust/27 objects/meson.build +++ b/test cases/rust/27 objects/meson.build @@ -33,3 +33,8 @@ lib12_rlib = static_library('lib12', 'lib1-dylib.rs', rust = import('rust') rust.doctest('rlib with dep', lib12_rlib) + +lib12_rlib_nodep = static_library('lib12_nodep', 'lib1-dylib.rs') +rust.doctest('rlib with dep in tests', lib12_rlib_nodep, + rust_args: ['--cfg', 'nodep'], + dependencies: dep2) |
