Merge branch 'master' into feature/metering-c-api

This commit is contained in:
Ivan Enderlin
2021-03-01 16:43:16 +01:00
62 changed files with 2690 additions and 1116 deletions

View File

@@ -494,9 +494,34 @@ fn exclude_items_from_wasm_c_api(builder: Builder) -> Builder {
.exclude_item("wasm_triple_new_from_host")
.exclude_item("wasm_triple_t")
.exclude_item("wasmer_compiler_t")
.exclude_item("wasmer_cpu_features_add")
.exclude_item("wasmer_cpu_features_delete")
.exclude_item("wasmer_cpu_features_new")
.exclude_item("wasmer_cpu_features_t")
.exclude_item("wasmer_engine_t")
.exclude_item("wasmer_metering_get_remaining_points")
.exclude_item("wasmer_metering_set_remaining_points")
.exclude_item("wasmer_is_compiler_available")
.exclude_item("wasmer_is_engine_available")
.exclude_item("wasmer_is_headless")
.exclude_item("wasmer_module_name")
.exclude_item("wasmer_module_set_name")
.exclude_item("wasmer_named_extern_module")
.exclude_item("wasmer_named_extern_name")
.exclude_item("wasmer_named_extern_t")
.exclude_item("wasmer_named_extern_unwrap")
.exclude_item("wasmer_named_extern_vec_copy")
.exclude_item("wasmer_named_extern_vec_delete")
.exclude_item("wasmer_named_extern_vec_new")
.exclude_item("wasmer_named_extern_vec_new_empty")
.exclude_item("wasmer_named_extern_vec_new_uninitialized")
.exclude_item("wasmer_target_delete")
.exclude_item("wasmer_target_new")
.exclude_item("wasmer_target_t")
.exclude_item("wasmer_triple_delete")
.exclude_item("wasmer_triple_new")
.exclude_item("wasmer_triple_new_from_host")
.exclude_item("wasmer_triple_t")
.exclude_item("wat2wasm")
}
@@ -528,6 +553,7 @@ fn build_inline_c_env_vars() {
let target = env::var("TARGET").unwrap();
assert_eq!(shared_object_dir.file_name(), Some(OsStr::new(&target)));
}
shared_object_dir.push(env::var("PROFILE").unwrap());
let shared_object_dir = shared_object_dir.as_path().to_string_lossy();
@@ -538,8 +564,11 @@ fn build_inline_c_env_vars() {
// * `-I`, add `include_dir` to include search path,
// * `-L`, add `shared_object_dir` to library search path,
// * `-D_DEBUG`, enable debug mode to enable `assert.h`.
// * `-D_CRT_SECURE_NO_WARNINGS`, disable security features in the
// Windows C runtime, which allows to use `getenv` without any
// warnings.
println!(
"cargo:rustc-env=INLINE_C_RS_CFLAGS=-I{I} -L{L} -D_DEBUG",
"cargo:rustc-env=INLINE_C_RS_CFLAGS=-I{I} -L{L} -D_DEBUG -D_CRT_SECURE_NO_WARNINGS",
I = include_dir,
L = shared_object_dir.clone(),
);