Skip to content

Commit

Permalink
Improved handling of wasmer-headless generation and use on local run
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb authored and theduke committed Feb 2, 2023
1 parent 3714f68 commit d400ba3
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ endif

# Not really "all", just the default target that builds enough so make
# install will go through.
all: build-wasmer build-capi
all: build-wasmer build-capi build-capi-headless

check: check-wasmer check-wasmer-wasm check-capi

Expand Down Expand Up @@ -561,7 +561,7 @@ test-wasi-unit:
test-wasi:
$(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) -- wasi::wasitests

test-integration-cli: build-wasmer build-capi package distribution
test-integration-cli: build-wasmer build-capi build-capi-headless package distribution
cp ./dist/wasmer.tar.gz ./link.tar.gz
rustup target add wasm32-wasi
$(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --features webc_runner --no-fail-fast -p wasmer-integration-tests-cli -- --nocapture --test-threads=1
Expand Down Expand Up @@ -635,6 +635,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/wasmer.dll package/lib/wasmer-headless.dll ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/wasmer.dll ]; then \
cp target/headless/$(HOST_TARGET)/release/wasmer.dll package/lib/wasmer-headless.dll ;\
fi

if [ -f $(TARGET_DIR)/wasmer.dll.lib ]; then \
cp $(TARGET_DIR)/wasmer.dll.lib package/lib/wasmer.dll.lib ;\
fi
Expand All @@ -643,6 +647,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/wasmer.dll.lib package/lib/wasmer-headless.dll.lib ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/wasmer.dll.lib ]; then \
cp target/headless/$(HOST_TARGET)/release/wasmer.dll.lib package/lib/wasmer-headless.dll.lib ;\
fi

if [ -f $(TARGET_DIR)/wasmer.lib ]; then \
cp $(TARGET_DIR)/wasmer.lib package/lib/wasmer.lib ;\
fi
Expand All @@ -651,6 +659,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/wasmer.lib package/lib/wasmer-headless.lib ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/wasmer.lib ]; then \
cp target/headless/$(HOST_TARGET)/release/wasmer.lib package/lib/wasmer-headless.lib ;\
fi

if [ -f $(TARGET_DIR)/libwasmer.dylib ]; then \
cp $(TARGET_DIR)/libwasmer.dylib package/lib/libwasmer.dylib ;\
fi
Expand All @@ -659,6 +671,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/libwasmer.dylib package/lib/libwasmer-headless.dylib ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/libwasmer.dylib ]; then \
cp target/headless/$(HOST_TARGET)/release/libwasmer.dylib package/lib/libwasmer-headless.dylib ;\
fi

if [ -f $(TARGET_DIR)/libwasmer.so ]; then \
cp $(TARGET_DIR)/libwasmer.so package/lib/libwasmer.so ;\
fi
Expand All @@ -667,6 +683,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/libwasmer.so package/lib/libwasmer-headless.so ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/libwasmer.so ]; then \
cp target/headless/$(HOST_TARGET)/release/libwasmer.so package/lib/libwasmer-headless.so ;\
fi

if [ -f $(TARGET_DIR)/libwasmer.a ]; then \
cp $(TARGET_DIR)/libwasmer.a package/lib/libwasmer.a ;\
fi
Expand All @@ -675,6 +695,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/libwasmer.a package/lib/libwasmer-headless.a ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/libwasmer.a ]; then \
cp target/headless/$(HOST_TARGET)/release/libwasmer.a package/lib/libwasmer-headless.a ;\
fi

if [ -f target/$(HOST_TARGET)/release/wasmer.dll ]; then \
cp target/$(HOST_TARGET)/release/wasmer.dll package/lib/wasmer.dll ;\
fi
Expand Down

0 comments on commit d400ba3

Please sign in to comment.