Move the wasmtime crate directories form lib/* to wasmtime-*.

This follows a similar change to Cranelift made here:

https://github.com/CraneStation/cranelift/pull/660
This commit is contained in:
Dan Gohman
2019-03-20 10:33:21 -07:00
parent 7b9761f4a2
commit db0abe8431
74 changed files with 21 additions and 21 deletions

37
wasmtime-runtime/build.rs Normal file
View File

@@ -0,0 +1,37 @@
extern crate bindgen;
extern crate cmake;
extern crate regex;
use cmake::Config;
use regex::Regex;
use std::env;
use std::path::PathBuf;
fn main() {
let dst = Config::new("signalhandlers").build();
println!("cargo:rustc-link-search=native={}", dst.display());
println!("cargo:rustc-link-lib=static=SignalHandlers");
let mut bindings_builder = bindgen::Builder::default()
.header("signalhandlers/SignalHandlers.hpp")
.whitelist_type("TrapContext")
.whitelist_type("jmp_buf")
.whitelist_function("EnsureEagerSignalHandlers");
// If we're compiling for Darwin, compile in extra Darwin support routines.
if Regex::new(r"-darwin[[:digit:].]*$")
.unwrap()
.is_match(&env::var("TARGET").unwrap())
{
bindings_builder = bindings_builder.whitelist_function("EnsureDarwinMachPorts");
}
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
bindings_builder
.generate()
.expect("Unable to generate bindings")
.write_to_file(out_path.join("signalhandlers.rs"))
.expect("Couldn't write bindings!");
}