From bbc95e94183bf4ac780276bc44bffdac0bffa435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Tue, 15 Nov 2022 18:55:34 +0100 Subject: [PATCH] github: waforthc fixes --- .github/actions/setup/action.yml | 4 ++++ .github/workflows/build-waforthc.yml | 2 +- src/waforthc/Makefile | 4 ++-- src/waforthc/waforthc.cpp | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index c8676ff..ac25f21 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -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 mv /tmp/wabt-1.0.31 /c/tools/wabt 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 - run: yarnpkg --pure-lockfile shell: bash diff --git a/.github/workflows/build-waforthc.yml b/.github/workflows/build-waforthc.yml index fde889c..c9a414d 100644 --- a/.github/workflows/build-waforthc.yml +++ b/.github/workflows/build-waforthc.yml @@ -10,7 +10,7 @@ jobs: build-waforthc: strategy: matrix: - os: [ubuntu-18.04] + os: [windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 diff --git a/src/waforthc/Makefile b/src/waforthc/Makefile index 2e4e817..cafb01c 100644 --- a/src/waforthc/Makefile +++ b/src/waforthc/Makefile @@ -32,7 +32,6 @@ WABT_INCLUDE_DIR = $(WABT_DIR)/include WABT_LIB_DIR = $(WABT_DIR)/lib WABT_DATA_DIR = $(WABT_DIR)/share/wabt LIBS := -mmacosx-version-min=13.0 -CXXFLAGS := -std=c++17 else # $(UNAME_S) GCC_TARGET_MACHINE = $(shell gcc -dumpmachine) WABT_INCLUDE_DIR ?= /usr/lib/include @@ -44,10 +43,11 @@ package: waforthc $(TAR) czf waforthc-v$(VERSION)-$(PACKAGE_SUFFIX).tgz waforthc endif # $(OS) +CPPFLAGS := -I$(WABT_INCLUDE_DIR) +CXXFLAGS := -std=c++17 $(CXXFLAGS) LIBS := \ $(WABT_LIB_DIR)/libwabt.a \ $(LIBS) -CPPFLAGS := -I$(WABT_INCLUDE_DIR) ifeq ($(DEBUG),1) CXXFLAGS := $(CXXFLAGS) -g diff --git a/src/waforthc/waforthc.cpp b/src/waforthc/waforthc.cpp index 959ff51..3e90cd5 100644 --- a/src/waforthc/waforthc.cpp +++ b/src/waforthc/waforthc.cpp @@ -9,6 +9,7 @@ #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) #include #else +#include #include #endif