github: waforthc fixes

This commit is contained in:
Remko Tronçon 2022-11-15 18:55:34 +01:00
parent 1cd666d026
commit bbc95e9418
4 changed files with 8 additions and 3 deletions

View file

@ -22,6 +22,10 @@ runs:
curl -L -s https://github.com/WebAssembly/wabt/releases/download/1.0.31/wabt-1.0.31-windows.tar.gz | tar xvz -C /tmp curl -L -s https://github.com/WebAssembly/wabt/releases/download/1.0.31/wabt-1.0.31-windows.tar.gz | tar xvz -C /tmp
mv /tmp/wabt-1.0.31 /c/tools/wabt mv /tmp/wabt-1.0.31 /c/tools/wabt
cp /c/tools/wabt/bin/* /c/Windows/system32 cp /c/tools/wabt/bin/* /c/Windows/system32
curl -L -s https://github.com/WebAssembly/wabt/releases/download/1.0.31/wabt-1.0.31.tar.xz | tar xvJ -C /tmp
mkdir -p /c/tools/wabt/share/wabt
mv /tmp/wabt-1.0.31/wasm2c /c/tools/wabt/share/wabt
echo "Done"
shell: bash shell: bash
- run: yarnpkg --pure-lockfile - run: yarnpkg --pure-lockfile
shell: bash shell: bash

View file

@ -10,7 +10,7 @@ jobs:
build-waforthc: build-waforthc:
strategy: strategy:
matrix: matrix:
os: [ubuntu-18.04] os: [windows-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View file

@ -32,7 +32,6 @@ WABT_INCLUDE_DIR = $(WABT_DIR)/include
WABT_LIB_DIR = $(WABT_DIR)/lib WABT_LIB_DIR = $(WABT_DIR)/lib
WABT_DATA_DIR = $(WABT_DIR)/share/wabt WABT_DATA_DIR = $(WABT_DIR)/share/wabt
LIBS := -mmacosx-version-min=13.0 LIBS := -mmacosx-version-min=13.0
CXXFLAGS := -std=c++17
else # $(UNAME_S) else # $(UNAME_S)
GCC_TARGET_MACHINE = $(shell gcc -dumpmachine) GCC_TARGET_MACHINE = $(shell gcc -dumpmachine)
WABT_INCLUDE_DIR ?= /usr/lib/include WABT_INCLUDE_DIR ?= /usr/lib/include
@ -44,10 +43,11 @@ package: waforthc
$(TAR) czf waforthc-v$(VERSION)-$(PACKAGE_SUFFIX).tgz waforthc $(TAR) czf waforthc-v$(VERSION)-$(PACKAGE_SUFFIX).tgz waforthc
endif # $(OS) endif # $(OS)
CPPFLAGS := -I$(WABT_INCLUDE_DIR)
CXXFLAGS := -std=c++17 $(CXXFLAGS)
LIBS := \ LIBS := \
$(WABT_LIB_DIR)/libwabt.a \ $(WABT_LIB_DIR)/libwabt.a \
$(LIBS) $(LIBS)
CPPFLAGS := -I$(WABT_INCLUDE_DIR)
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
CXXFLAGS := $(CXXFLAGS) -g CXXFLAGS := $(CXXFLAGS) -g

View file

@ -9,6 +9,7 @@
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
#include <windows.h> #include <windows.h>
#else #else
#include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
#endif #endif