github.com/higress-group/nottinygc@v0.0.0-20231101025119-e93c4c2f8520/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/1d9826992aa2a2783c9badbacddae70fdf7fffee.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  # While signals aren't actually used the header file is included unconditionally. We can enable the header file
    15  # without linking the actual signals library because the functions aren't called.
    16  ENV CFLAGS -O3 -D_WASI_EMULATED_SIGNAL ${CFLAGS}
    17  
    18  # host is required by configure but not used so set it arbitrarily
    19  RUN ./configure --disable-threads --disable-shared --disable-gcj-support --disable-java-finalization --disable-atomic-uncollectible --host=i686-pc-linux-gnu
    20  RUN make
    21  
    22  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/"]