Created
March 6, 2020 06:30
-
-
Save jwasinger/be523f35ee4099d5f4776434c431ec91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:19.04 | |
# System deps | |
RUN apt-get clean | |
RUN apt-get update | |
RUN apt-get install -y software-properties-common git sudo build-essential wget curl nano \ | |
autoconf automake libtool make ninja-build unzip zlib1g-dev texinfo libssl-dev | |
RUN sudo apt-get clean autoclean | |
RUN sudo apt-get autoremove -y | |
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ | |
apt-add-repository "deb http://apt.llvm.org/disco/ llvm-toolchain-disco-10 main" && \ | |
apt-get update | |
RUN apt-get install -y libllvm-10-ocaml-dev libllvm10 llvm-10 llvm-10-dev llvm-10-doc llvm-10-examples llvm-10-runtime | |
RUN apt-get install -y clang-10 clang-tools-10 clang-10-doc libclang-common-10-dev libclang-10-dev libclang1-10 clang-format-10 | |
RUN apt-get install -y lldb-10 lld-10 libc++-10-dev libc++abi-10-dev | |
# comment out all this to use gcc instead of clang | |
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 60 | |
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 60 | |
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 60 | |
RUN update-alternatives --install /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-10 60 | |
RUN update-alternatives --install /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-10 60 | |
RUN update-alternatives --install /usr/bin/llvm-ranlib llvm-ranlib /usr/bin/llvm-ranlib-10 60 | |
RUN update-alternatives --install /usr/bin/ld ld.lld-10 /usr/bin/ld.lld-10 60 | |
RUN apt-get install -y cmake | |
RUN apt-get install -y python # python2.7 needed to build wabt | |
RUN apt-get install -y python3 python3-distutils | |
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py | |
WORKDIR /engines | |
# install node 12 | |
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash | |
RUN apt-get install -y nodejs | |
# install google benchmark lib, needed for wabt-secp | |
RUN git clone https://github.com/google/benchmark.git google-benchmark | |
# commit 8e0b1913d4ea803dfeb2e55567208fcab6b1b6c7 | |
RUN git clone https://github.com/google/googletest.git google-benchmark/googletest | |
RUN cd google-benchmark && mkdir build | |
#RUN cd google-benchmark/build && cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_LTO=true ../ | |
# we need BENCHMARK_USE_LIBCXX=true because we're going to use clang to compile wabt | |
RUN cd google-benchmark/build && cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_USE_LIBCXX=true ../ | |
RUN cd google-benchmark/build && make -j8 | |
RUN cd google-benchmark/build && make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment