284: fix make debug-release r=MarkMcCaskey a=MarkMcCaskey

My guess without looking in to the history is that:
- the unsafe block was around the `debug!` call
- when debug was off, it was giving a warning because the unsafe block was empty
- the unsafe was removed to stop the warning
- it wasn't tested with the debug flag

This PR also
- cleans up the Makefile
- adds debug-release to CI

Co-authored-by: Mark McCaskey <mark@wasmer.io>
This commit is contained in:
bors[bot] 2019-03-20 18:35:32 +00:00
commit 40be4da925
3 changed files with 5 additions and 4 deletions

View File

@ -167,6 +167,10 @@ jobs:
echo "${VERSION}" >> artifacts/version
echo "${CIRCLE_TAG}" >> artifacts/git_version
cp ./target/release/wasmer ./artifacts/$(./binary-name.sh)
- run:
name: Debug flag checked
command: |
cargo check --features "debug"
- persist_to_workspace:
root: .
paths:

View File

@ -50,9 +50,6 @@ release:
# brew install mingw-w64
cargo build --release
debug-release:
cargo build --release --features debug
debug-release:
cargo build --release --features "debug"

View File

@ -282,7 +282,7 @@ pub fn ___syscall102(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_in
let _proper_address = address as *const GuestSockaddrIn;
debug!(
"=> address.sin_family: {:?}, address.sin_port: {:?}, address.sin_addr.s_addr: {:?}",
(*_proper_address).sin_family, (*_proper_address).sin_port, (*_proper_address).sin_addr.s_addr
unsafe { (*_proper_address).sin_family }, unsafe { (*_proper_address).sin_port }, unsafe { (*_proper_address).sin_addr.s_addr }
);
let status = unsafe { bind(socket, address, address_len) };