You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/12/26 03:09:26 UTC

[incubator-doris] branch master updated: [chore](docker) Add clang11 in docker dev image (#7470)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 43e9318  [chore](docker) Add clang11 in docker dev image (#7470)
43e9318 is described below

commit 43e93180c528f7526a8115f9aa6ad0b1a06a27a8
Author: xiedeyantu <cz...@163.com>
AuthorDate: Sun Dec 26 11:09:17 2021 +0800

    [chore](docker) Add clang11 in docker dev image (#7470)
---
 docker/Dockerfile | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/docker/Dockerfile b/docker/Dockerfile
index 1e6446e..f0b7b92 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -92,6 +92,20 @@ RUN cd ${DEFAULT_DIR}/incubator-doris && /bin/bash thirdparty/build-thirdparty.s
 
 RUN alternatives --set java java-11-openjdk.x86_64 && alternatives --set javac java-11-openjdk.x86_64
 
+# build clang 11
+RUN wget -P ${DEFAULT_DIR}  https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/llvm-project-11.0.0.tar.xz \
+    && tar Jxf ${DEFAULT_DIR}/llvm-project-11.0.0.tar.xz -C ${DEFAULT_DIR} \
+    && echo "source /opt/rh/devtoolset-10/enable" > ${DEFAULT_DIR}/build_clang.sh \
+    && echo "cd ${DEFAULT_DIR}/llvm-project-11.0.0" >> ${DEFAULT_DIR}/build_clang.sh \
+    && echo "mkdir build" >> ${DEFAULT_DIR}/build_clang.sh \
+    && echo "cd build" >> ${DEFAULT_DIR}/build_clang.sh \
+    && echo "cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_PROJECTS=\"clang;libcxx;libcxxabi\" -G \"Unix Makefiles\" ../llvm " >> ${DEFAULT_DIR}/build_clang.sh \
+    && echo "make -j $(nproc)" >> ${DEFAULT_DIR}/build_clang.sh \
+    && echo "make install" >> ${DEFAULT_DIR}/build_clang.sh \
+    && echo "rm -rf ${DEFAULT_DIR}/llvm-project-11.0.0*" >> ${DEFAULT_DIR}/build_clang.sh \
+    && chmod +x ${DEFAULT_DIR}/build_clang.sh \
+    && ${DEFAULT_DIR}/build_clang.sh
+
 FROM scratch
 
 COPY --from=builder / /
@@ -106,4 +120,4 @@ ENV JAVA_HOME="/usr/lib/jvm/java-11" \
     DORIS_THIRDPARTY="/var/local/thirdparty"
 WORKDIR /root
 
-CMD ["/bin/bash"]
+CMD ["/bin/bash"]
\ No newline at end of file

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org