Skip to content

Commit

Permalink
Switch TinyGo to custom gc fork (envoyproxy#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored Nov 30, 2022
1 parent eadd078 commit 447795c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions buildtools/tinygo/wasi-libc.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ FROM ghcr.io/corazawaf/coraza-proxy-wasm/buildtools-wasi-sdk:main

RUN apt-get install -y git

RUN git clone https://github.com/tinygo-org/tinygo --branch dev
RUN git clone https://github.com/anuraaga/tinygo --branch custom-gc
WORKDIR /tinygo
RUN git fetch origin dev && git reset --hard 4daf4fa0a061e7e3b098a3b2a9d8bf022424c6d3
# https://github.com/tinygo-org/tinygo/pull/3302
RUN git fetch origin custom-gc && git reset --hard e27e61ed063c4febd053f3e1637e9f89b012ad1f
RUN git submodule update --init lib/wasi-libc
RUN make wasi-libc
2 changes: 1 addition & 1 deletion magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func Build() error {
script := fmt.Sprintf(`
cd /src && \
tinygo build -gc=none -opt=2 -o %s -scheduler=none -target=wasi %s`, filepath.Join("build", "mainraw.wasm"), buildTagArg)
if err := sh.RunV("docker", "run", "--pull=always", "--rm", "-v", fmt.Sprintf("%s:/src", wd), "ghcr.io/corazawaf/coraza-proxy-wasm/buildtools-tinygo:main",
if err := sh.RunV("docker", "run", "--pull=always", "--rm", "-v", fmt.Sprintf("%s:/src", wd), "ghcr.io/corazawaf/coraza-proxy-wasm/buildtools-tinygo:sha-eadd078",
"bash", "-c", script); err != nil {
return err
}
Expand Down

0 comments on commit 447795c

Please sign in to comment.