When the proc-macro rlib is in a different subdir, it would miss the needed -L argument and rustc would not find it. Meson was assuming that proc-macros are only needed when building libraries that uses it, but it turns out that was wrong, as show by the unit test.pull/12623/merge
parent
937d1c639a
commit
aee941559c
5 changed files with 27 additions and 2 deletions
@ -0,0 +1,8 @@ |
||||
extern crate proc_macro_examples; |
||||
use proc_macro_examples::make_answer; |
||||
|
||||
make_answer!(); |
||||
|
||||
pub fn func() -> u32 { |
||||
answer() |
||||
} |
@ -0,0 +1 @@ |
||||
pm_in_subdir = rust.proc_macro('proc_macro_examples3', '../proc.rs') |
@ -0,0 +1,7 @@ |
||||
extern crate staticlib; |
||||
use staticlib::func; |
||||
|
||||
|
||||
fn main() { |
||||
assert_eq!(42, func()); |
||||
} |
Loading…
Reference in new issue