Skip to content

Commit b99289e

Browse files
authored
Merge pull request #109 from vmware-labs/wasi-sdk-20
wasi-sdk version to 20
2 parents 300c157 + 80b950b commit b99289e

File tree

21 files changed

+54
-52
lines changed

21 files changed

+54
-52
lines changed

Dockerfile.wasi-builder

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
ARG WABT_VERSION=1.0.32
2-
ARG WASI_SDK_VERSION=19.0
3-
ARG WASI_SDK_RELEASE_NAME=wasi-sdk-19
2+
# E.g. WASI_SDK_VERSION=20.0
3+
ARG WASI_SDK_VERSION
4+
# E.g. WASI_SDK_RELEASE_NAME=wasi-sdk-20
5+
ARG WASI_SDK_RELEASE_NAME
6+
47
# For beta releases with specific features this goes like:
58
# ARG WASI_SDK_VERSION=20.0.threads
69
# ARG WASI_SDK_RELEASE_NAME=wasi-sdk-20+threads
7-
ARG WASI_VFS_VERSION=ddbea0e2a6a1e0e8fe0373ec3d1bdccf522178ab
10+
ARG WASI_VFS_VERSION=v0.4.0
811

912
ARG WASI_SDK_PATH=/wasi-sdk
1013
ARG WASI_SDK_ASSET_NAME=wasi-sdk-${WASI_SDK_VERSION}

Makefile.builders

+17-10
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,25 @@ wasm-base:
1717
push-wasm-base:
1818
@$(call push_container_image,$(WASM_BASE_NAME))
1919

20-
.PHONY: wasi-builder-19-0
21-
WASI_BUILDER_19_NAME := ghcr.io/vmware-labs/wasmlabs/wasi-builder:19.0
22-
wasi-builder-19-0:
23-
@echo Building $(WASI_BUILDER_19_NAME) in $(BUILDER_ROOT_DIR) ... && \
20+
.PHONY: wasi-builder
21+
WASI_BUILDER_NAME := ghcr.io/vmware-labs/wasmlabs/wasi-builder:$(WASI_SDK_VERSION)
22+
wasi-builder:
23+
@echo Building $(WASI_BUILDER_NAME) in $(BUILDER_ROOT_DIR) ... && \
2424
docker build \
2525
--platform linux/amd64 \
26-
--build-arg WASI_SDK_RELEASE_NAME=wasi-sdk-19 \
27-
--build-arg WASI_SDK_VERSION=19.0 \
26+
--build-arg WASI_SDK_RELEASE_NAME=wasi-sdk-$(word 1,$(subst ., ,$(WASI_SDK_VERSION))) \
27+
--build-arg WASI_SDK_VERSION=$(WASI_SDK_VERSION) \
2828
-f $(BUILDER_ROOT_DIR)/Dockerfile.wasi-builder \
29-
-t $(WASI_BUILDER_19_NAME) \
29+
-t $(WASI_BUILDER_NAME) \
3030
$(BUILDER_ROOT_DIR)
3131

32-
.PHONY: push-wasi-builder-19-0
33-
push-wasi-builder-19-0:
34-
@$(call push_container_image,$(WASI_BUILDER_19_NAME))
32+
.PHONY: update-wasi-builder
33+
update-wasi-builder: wasi-builder
34+
@$(call push_container_image,$(WASI_BUILDER_NAME))
35+
36+
37+
.PHONY: update-all-builders
38+
update-all-builders: update-wasi-builder
39+
make -f php/Makefile update-php-builder
40+
make -f python/Makefile update-python-builder
41+
make -f ruby/Makefile update-ruby-builder

Makefile.helpers

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Default wask-sdk version used in builds
2+
WASI_SDK_VERSION ?= 20.0
3+
14
define push_container_image
25
$(eval $@_IMAGE_NAME = $(1))
36
@(docker image inspect $($@_IMAGE_NAME) 1>/dev/null 2>&1 || \

docs/developers.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
This document is a work in progress.
2+
3+
# Processes
4+
5+
## Updating Wasi-Sdk version
6+
7+
You will need ghcr.io credentials with rights to publish to `ghcr.io/vmware-labs/wasmlabs`!
8+
9+
- Bump the `WASI_SDK_VERSION ?= ##.#` in [Makefile.helpers](../Makefile.helpers)
10+
- Build and publish all builder images with a new tag based on `WASI_SDK_VERSION`
11+
```
12+
make -f Makefile.builders update-all-builders
13+
```
14+
- Release all independent libraries
15+
- Bump URLs in the libraries/runtimes which depend on them, then publish them, too

libs/bundle_wlr/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/bzip2/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/icu/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/libjpeg/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/libpng/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/libuuid/Makefile

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
# NOTE - the default python build is failing with wasi-sdk-19
3-
41
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
52
REPO_ROOT := $(ROOT_DIR)../..
63

libs/libxml2/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/oniguruma/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/sqlite/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/wasmedge_sock/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

libs/zlib/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)../..
53

php/Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)..
53

@@ -10,8 +8,8 @@ PHP_BUILDER_NAME := ghcr.io/vmware-labs/wasmlabs/php-builder:wasi-$(WASI_SDK_VER
108
php-builder:
119
@$(call make_builder_image,$(PHP_BUILDER_NAME),$(ROOT_DIR),$(WASI_SDK_VERSION))
1210

13-
.PHONY: push-php-builder
14-
push-php-builder:
11+
.PHONY: update-php-builder
12+
update-php-builder: php-builder
1513
@$(call push_container_image,$(PHP_BUILDER_NAME))
1614

1715
.PHONY: php-*

php/php-8.1.11/wlr-build.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ export LDFLAGS_WASI="--sysroot=${WASI_SYSROOT} -lwasi-emulated-getpid -lwasi-emu
1515
########## Setup the flags for php #############
1616
export CFLAGS_PHP='-D_POSIX_SOURCE=1 -D_GNU_SOURCE=1 -DHAVE_FORK=0 -DWASM_WASI'
1717

18+
export LDFLAGS_WARNINGS='-Wno-unused-command-line-argument -Wno-implicit-function-declaration -Wno-incompatible-function-pointer-types'
19+
1820
# We need to add LDFLAGS ot CFLAGS because autoconf compiles(+links) to binary when checking stuff
19-
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES}"
21+
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES} ${LDFLAGS_WARNINGS}"
2022
export CFLAGS="${CFLAGS_CONFIG} ${CFLAGS_WASI} ${CFLAGS_DEPENDENCIES} ${CFLAGS_PHP} ${LDFLAGS}"
2123

2224
cd "${WLR_SOURCE_PATH}"

php/php-8.2.0-slim/wlr-build.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ export LDFLAGS_WASI="--sysroot=${WASI_SYSROOT} -lwasi-emulated-getpid -lwasi-emu
1616
########## Setup the flags for php #############
1717
export CFLAGS_PHP='-D_POSIX_SOURCE=1 -D_GNU_SOURCE=1 -DHAVE_FORK=0 -DWASM_WASI'
1818

19+
export LDFLAGS_WARNINGS='-Wno-unused-command-line-argument -Werror=implicit-function-declaration -Wno-incompatible-function-pointer-types'
20+
1921
# We need to add LDFLAGS ot CFLAGS because autoconf compiles(+links) to binary when checking stuff
20-
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES} ${LDFLAGS_SQLITE}"
22+
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES} ${LDFLAGS_SQLITE} ${LDFLAGS_WARNINGS}"
2123
export CFLAGS="${CFLAGS_CONFIG} ${CFLAGS_WASI} ${CFLAGS_DEPENDENCIES} ${CFLAGS_PHP} ${LDFLAGS}"
2224

2325
logStatus "CFLAGS="${CFLAGS}

php/php-8.2.0/wlr-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export LDFLAGS_WASI="--sysroot=${WASI_SYSROOT} -lwasi-emulated-getpid -lwasi-emu
1717
########## Setup the flags for php #############
1818
export CFLAGS_PHP='-D_POSIX_SOURCE=1 -D_GNU_SOURCE=1 -DHAVE_FORK=0 -DPNG_USER_CONFIG -DWASM_WASI'
1919

20-
export LDFLAGS_WARNINGS='-Wno-unused-command-line-argument -Werror=implicit-function-declaration'
20+
export LDFLAGS_WARNINGS='-Wno-unused-command-line-argument -Werror=implicit-function-declaration -Wno-incompatible-function-pointer-types'
2121

2222
# We need to add LDFLAGS ot CFLAGS because autoconf compiles(+links) to binary when checking stuff
2323
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES} ${LDFLAGS_WARNINGS}"

python/Makefile

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
# NOTE - the default python build is failing with wasi-sdk-19
3-
41
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
52
REPO_ROOT := $(ROOT_DIR)..
63

@@ -11,8 +8,8 @@ PYTHON_BUILDER_NAME := ghcr.io/vmware-labs/wasmlabs/python-builder:wasi-$(WASI_S
118
python-builder:
129
@$(call make_builder_image,$(PYTHON_BUILDER_NAME),$(ROOT_DIR),$(WASI_SDK_VERSION))
1310

14-
.PHONY: push-python-builder
15-
push-python-builder:
11+
.PHONY: update-python-builder
12+
update-python-builder: python-builder
1613
@$(call push_container_image,$(PYTHON_BUILDER_NAME))
1714

1815
.PHONY: v*

ruby/Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WASI_SDK_VERSION ?= 19.0
2-
31
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
42
REPO_ROOT := $(ROOT_DIR)..
53

@@ -10,8 +8,8 @@ RUBY_BUILDER_NAME := ghcr.io/vmware-labs/wasmlabs/ruby-builder:wasi-$(WASI_SDK_V
108
ruby-builder:
119
@$(call make_builder_image,$(RUBY_BUILDER_NAME),$(ROOT_DIR),$(WASI_SDK_VERSION))
1210

13-
.PHONY: push-ruby-builder
14-
push-ruby-builder:
11+
.PHONY: update-ruby-builder
12+
update-ruby-builder: ruby-builder
1513
@$(call push_container_image,$(RUBY_BUILDER_NAME))
1614

1715
.PHONY: v*

0 commit comments

Comments
 (0)