Skip to content

Commit

Permalink
Docker: Install MLIR.
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed Nov 20, 2023
1 parent b46689d commit 0b92233
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions xdsl_llvm.docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:22.04 as build

ARG mlirhash=04fc02e583b06b846315904a55af9c273c8b20b9

Expand All @@ -15,11 +15,10 @@ RUN git init llvm-project \
&& git remote add origin https://github.com/llvm/llvm-project.git \
&& git config --local gc.auto 0 \
&& git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin $mlirhash \
&& git checkout --progress --force FETCH_HEAD

RUN mkdir llvm-project/build \
&& cd llvm-project/build \
&& cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="mlir;clang;openmp;lld" -DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON -DLLVM_BINUTILS_INCDIR=/usr/include

RUN cd llvm-project/build \
&& ninja
&& git checkout --progress --force FETCH_HEAD \
&& mkdir build \
&& cd build \
&& cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="mlir;clang;openmp;lld" -DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON -DLLVM_BINUTILS_INCDIR=/usr/include \
&& ninja install \
&& cd ../../ \
&& rm -rf llvm-project

0 comments on commit 0b92233

Please sign in to comment.