Skip to content

Commit

Permalink
Merge #284
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bors[bot] and Mark McCaskey committed Mar 20, 2019
2 parents 4a74382 + 95fc436 commit 40be4da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion lib/emscripten/src/syscalls/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) };
Expand Down

0 comments on commit 40be4da

Please sign in to comment.