Remove use of offset_of! from wasmtime-environ.

wasmtime-environ is meant to support cross compilation, so it shouldn't
have dependencies on target layout of structs. This moves the layout
back into wasmtime-execute, and adds a system of asserts for checking
that wasmtime-environ's offsets stay in sync.
This commit is contained in:
Dan Gohman
2018-11-30 16:50:05 -08:00
parent 099f85f821
commit fe1643733b
10 changed files with 355 additions and 66 deletions

View File

@@ -19,12 +19,16 @@ region = "1.0.0"
lazy_static = "1.2.0"
libc = { version = "0.2.44", default-features = false }
errno = "0.2.4"
cast = { version = "0.2.2", default-features = false }
[build-dependencies]
cmake = "0.1.35"
bindgen = "0.44.0"
regex = "1.0.6"
[dev-dependencies]
memoffset = "0.2.1"
[features]
default = ["std"]
std = ["cranelift-codegen/std", "cranelift-wasm/std"]