Skip to content

Commit

Permalink
Add mimalloc to updateLibs and fix Dockerfile (envoyproxy#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored Oct 25, 2022
1 parent 1d09e73 commit b1759b1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buildtools/mimalloc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ RUN mkdir -p /mimalloc && curl -L https://github.com/microsoft/mimalloc/archive/
WORKDIR /mimalloc
ADD mimalloc.patch mimalloc.patch
RUN patch -p1 < mimalloc.patch
RUN mkdir -p out/release && cd out/release && cmake ../.. -DMI_BUILD_SHARED=off -DMI_BUILD_TESTS=off && make && llvm-ranlib-14 libmimalloc.a
RUN mkdir -p out/release && cd out/release && cmake ../.. -DMI_BUILD_SHARED=off -DMI_BUILD_TESTS=off && make && ${RANLIB} libmimalloc.a

CMD ["cp", "./out/release/libmimalloc.a", "/out/libmimalloc.a"]
Binary file modified lib/libmimalloc.a
Binary file not shown.
2 changes: 1 addition & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ tinygo build -gc=none -opt=2 -o %s -scheduler=none -target=wasi %s`, filepath.Jo

// UpdateLibs updates the C++ filter dependencies.
func UpdateLibs() error {
libs := []string{"aho-corasick", "libinjection", "re2"}
libs := []string{"aho-corasick", "libinjection", "mimalloc", "re2"}
for _, lib := range libs {
if err := sh.RunV("docker", "build", "-t", "ghcr.io/corazawaf/coraza-proxy-wasm/buildtools-"+lib, filepath.Join("buildtools", lib)); err != nil {
return err
Expand Down

0 comments on commit b1759b1

Please sign in to comment.