From 0b9223378d65590731d3cc3a76c90eaf91b278de Mon Sep 17 00:00:00 2001 From: Emilien Bauer Date: Mon, 20 Nov 2023 17:49:53 +0000 Subject: [PATCH] Docker: Install MLIR. --- xdsl_llvm.docker | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/xdsl_llvm.docker b/xdsl_llvm.docker index 1235799ddb..26a304c4cf 100644 --- a/xdsl_llvm.docker +++ b/xdsl_llvm.docker @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:22.04 as build ARG mlirhash=04fc02e583b06b846315904a55af9c273c8b20b9 @@ -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 \ No newline at end of file + && 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