Skip to content

Instantly share code, notes, and snippets.

@gjz010
Created August 31, 2019 16:24
Show Gist options
  • Save gjz010/7448760c63ed89ce6e39d5e7c1f1d416 to your computer and use it in GitHub Desktop.
Save gjz010/7448760c63ed89ce6e39d5e7c1f1d416 to your computer and use it in GitHub Desktop.
OpenArkCompiler Dockerfile
FROM ubuntu:16.04
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get -y install openjdk-8-jdk git-core gnupg flex bison gperf \
build-essential zip curl zlib1g-dev libc6-dev-i386 lib32ncurses5-dev \
x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils \
xsltproc unzip lib32z1-dev qemu g++-multilib gcc-multilib python3-paramiko \
python-paramiko python-jenkins python-requests python-xlwt libglib2.0-dev \
libpixman-1-dev linux-libc-dev:i386
RUN apt-get -y install gcc-5-aarch64-linux-gnu g++-5-aarch64-linux-gnu
RUN git clone https://code.opensource.huaweicloud.com/HarmonyOS/OpenArkCompiler.git
ENV MAPLE_ROOT=/OpenArkCompiler/
RUN sed -i 's/GN_INSTALL_PREFIX = ""/GN_INSTALL_PREFIX = "\/OpenArkCompiler\/"/g' /OpenArkCompiler/build/config/BUILDCONFIG.gn
WORKDIR /OpenArkCompiler/tools
RUN curl -O http://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
RUN tar -xvf clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
RUN curl -L -O https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip
RUN unzip ninja-linux.zip
RUN mkdir ninja_1.9.0
RUN mv ninja ninja_1.9.0/
RUN mkdir gn
RUN curl -o gn/gn https://archive.softwareheritage.org/browse/content/sha1_git:2dc0d5b26caef44f467de8120b26f8aad8b878be/raw/?filename=gn
RUN chmod +x gn/gn
RUN mv clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04 clang_llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04
WORKDIR /OpenArkCompiler
RUN bash -c "source build/envsetup.sh;make"
WORKDIR /OpenArkCompiler/out/bin
RUN chmod +x java2jar jbc2mpl maple mplcg
ENV PATH=/OpenArkCompiler/out/bin:$PATH
WORKDIR /OpenArkCompiler/out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment