wiggle: witx paths use shell expansion

instead of always being relative to CARGO_MANIFEST_DIR, each use site is
responsible for either putting that variable or another one (set by a
build.rs) at the start of witx paths.
This commit is contained in:
Pat Hickey
2020-08-28 15:41:19 -07:00
parent 5c6ed0c736
commit 91dac9c7e8
5 changed files with 25 additions and 52 deletions

View File

@@ -47,10 +47,7 @@ use config::{MissingMemoryConf, ModuleConf, TargetConf};
///
#[proc_macro]
pub fn wasmtime_integration(args: TokenStream) -> TokenStream {
let mut config = parse_macro_input!(args as config::Config);
config.witx.make_paths_relative_to(
std::env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR env var"),
);
let config = parse_macro_input!(args as config::Config);
let doc = config.load_document();
let names = Names::new(&config.ctx.name, quote!(wasmtime_wiggle));