Commit cab80b7f authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari

aarch64-linux-deb9, armv7-linux-deb9, x86_64-linux-deb9: Reorganize LLVM treatment

parent ecb41240
......@@ -16,31 +16,33 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*
# Boot LLVM
ENV BOOT_LLVM_DIR /opt/llvm-bootstrap
ENV BOOT_LLVM_VERSION 7.0.0
ENV PATH /usr/local/bin:$PATH
ENV LLVM_TARBALL http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-aarch64-linux-gnu.tar.xz
RUN curl $LLVM_TARBALL | tar -xJC . && \
mkdir /opt/llvm6 && \
cp -R clang+llvm*/* /opt/llvm6 && \
RUN curl http://releases.llvm.org/$BOOT_LLVM_VERSION/clang+llvm-$BOOT_LLVM_VERSION-aarch64-linux-gnu.tar.xz | tar -xJC . && \
mkdir $BOOT_LLVM_DIR && \
cp -R clang+llvm*/* $BOOT_LLVM_DIR && \
rm -R clang+llvm* && \
/opt/llvm6/bin/llc --version
$BOOT_LLVM_DIR/bin/llc --version
# GHC
# Use 8.8.1 to bootstrap, since earlier releases are especially buggy on AArch64
ENV GHC_VERSION 8.8.1
RUN curl http://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-aarch64-deb9-linux.tar.xz | tar -xJ
WORKDIR /ghc-$GHC_VERSION
RUN ./configure --prefix=/usr/local LLC=/opt/llvm6/bin/llc OPT=/opt/llvm6/bin/opt && \
RUN ./configure --prefix=/usr/local LLC=$BOOT_LLVM_DIR/bin/llc OPT=$BOOT_LLVM_DIR/bin/opt && \
make install
WORKDIR /
RUN rm -Rf ghc-*
RUN ghc --version
# LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-aarch64-linux-gnu.tar.xz
ENV PATH /opt/llvm7/bin:$PATH
RUN curl $LLVM_TARBALL | tar -xJC . && \
mkdir /opt/llvm7 && \
cp -R clang+llvm*/* /opt/llvm7 && \
ENV LLVM_DIR /opt/llvm
ENV LLVM_VERSION 7.0.0
ENV PATH $LLVM_DIR/bin:$PATH
RUN curl http://releases.llvm.org/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-aarch64-linux-gnu.tar.xz | tar -xJC . && \
mkdir $LLVM_DIR && \
cp -R clang+llvm*/* $LLVM_DIR && \
rm -R clang+llvm* && \
llc --version
......
......@@ -17,31 +17,33 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*
# Boot LLVM
ENV BOOT_LLVM_DIR /opt/llvm-bootstrap
ENV BOOT_LLVM_VERSION 7.0.0
ENV PATH /usr/local/bin:$PATH
ENV LLVM_TARBALL http://releases.llvm.org/5.0.1/clang+llvm-5.0.1-armv7a-linux-gnueabihf.tar.xz
RUN curl $LLVM_TARBALL | tar -xJC . && \
mkdir /opt/llvm5 && \
cp -R clang+llvm*/* /opt/llvm5 && \
RUN curl http://releases.llvm.org/$BOOT_LLVM_VERSION/clang+llvm-$BOOT_LLVM_VERSION-armv7a-linux-gnueabihf.tar.xz | tar -xJC . && \
mkdir $BOOT_LLVM_DIR && \
cp -R clang+llvm*/* $BOOT_LLVM_DIR && \
rm -R clang+llvm* && \
/opt/llvm5/bin/llc --version
$BOOT_LLVM_DIR/bin/llc --version
# GHC
# Use 8.8.1 to bootstrap, since earlier releases are especially buggy on AArch64
ENV GHC_VERSION 8.8.1
RUN curl http://home.smart-cactus.org/~ben/ghc/ghc-$GHC_VERSION-arm-unknown-linux.tar.xz | tar -xJ
WORKDIR /ghc-$GHC_VERSION
RUN ./configure --prefix=/usr/local LLC=/opt/llvm5/bin/llc OPT=/opt/llvm5/bin/opt && \
RUN ./configure --prefix=/usr/local LLC=$BOOT_LLVM_DIR/bin/llc OPT=$BOOT_LLVM_DIR/bin/opt && \
make install
WORKDIR /
RUN rm -Rf ghc-*
RUN ghc --version
# LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-armv7a-linux-gnueabihf.tar.xz
ENV PATH /opt/llvm7/bin:$PATH
RUN curl $LLVM_TARBALL | tar -xJC . && \
mkdir /opt/llvm7 && \
cp -R clang+llvm*/* /opt/llvm7 && \
ENV LLVM_DIR /opt/llvm
ENV LLVM_VERSION 7.0.0
ENV PATH $LLVM_DIR/bin:$PATH
RUN curl http://releases.llvm.org/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-armv7a-linux-gnueabihf.tar.xz | tar -xJC . && \
mkdir $LLVM_DIR && \
cp -R clang+llvm*/* $LLVM_DIR && \
rm -R clang+llvm* && \
llc --version
......
......@@ -48,12 +48,13 @@ RUN curl https://downloads.haskell.org/cabal/cabal-install-$CABAL_VERSION/cabal-
mv cabal /usr/local/bin/cabal
# LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
ENV PATH /opt/llvm/bin:$PATH
RUN curl $LLVM_TARBALL | tar -xJC .; \
mkdir /opt/llvm; \
cp -R clang+llvm*/* /opt/llvm; \
rm -R clang+llvm*; \
ENV LLVM_DIR /opt/llvm
ENV LLVM_VERSION 7.0.0
ENV PATH $LLVM_DIR/bin:$PATH
RUN curl http://releases.llvm.org/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-x86_64-linux-gnu-ubuntu-16.04.tar.xz | tar -xJC .; \
mkdir $LLVM_DIR && \
cp -R clang+llvm*/* $LLVM_DIR && \
rm -R clang+llvm* && \
llc --version
# Create a normal user.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment