github.com/wasilibs/nottinygc@v0.7.2-0.20240312114022-d59c9478ef51/buildtools/bdwgc/Dockerfile (about)

     1  # Copyright wasilibs authors
     2  # SPDX-License-Identifier: MIT
     3  
     4  FROM ghcr.io/webassembly/wasi-sdk:wasi-sdk-20
     5  
     6  RUN apt-get -y update && apt-get -y install curl patch
     7  
     8  RUN mkdir -p /bdwgc && curl -L https://github.com/ivmai/bdwgc/archive/a753bcb459649d20331d9c9f1dba94588ef56829.tar.gz | tar -xz --strip-components 1 -C /bdwgc
     9  WORKDIR /bdwgc
    10  ADD bdwgc.patch bdwgc.patch
    11  RUN patch -p1 < bdwgc.patch
    12  RUN ./autogen.sh
    13  
    14  ENV CFLAGS -O3 ${CFLAGS}
    15  
    16  # host is required by configure but not used so set it arbitrarily
    17  RUN ./configure --disable-threads --disable-shared --disable-gcj-support --disable-java-finalization --disable-atomic-uncollectible --host=i686-pc-linux-gnu
    18  RUN make
    19  
    20  CMD ["sh", "-c", "cp /bdwgc/.libs/libgc.a /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/wasi/libclang_rt.builtins-wasm32.a /out/"]