aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/tools/dockerfile/clang_update.include
blob: 4f827c8dc21b9f89d1a7bae64461731e7f415b85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#=================
# Update clang to a version with improved tsan and fuzzing capabilities

RUN apt-get update && apt-get -y install python cmake && apt-get clean

RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && ${'\\'}
  cd llvm && git checkout ad57503 && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/clang.git && ${'\\'}
  cd clang && git checkout ad2c56e && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && ${'\\'}
  cd compiler-rt && git checkout 3176922 && cd ..
RUN git clone -n -b release_38 ${'\\'}
  http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && ${'\\'}
  git checkout c288525 && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && ${'\\'}
  cd libcxx && git checkout fda3549  && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && ${'\\'}
  cd libcxxabi && git checkout 8d4e51d && cd ..

RUN mv clang llvm/tools
RUN mv compiler-rt llvm/projects
RUN mv clang-tools-extra llvm/tools/clang/tools
RUN mv libcxx llvm/projects
RUN mv libcxxabi llvm/projects

RUN mkdir llvm-build
RUN cd llvm-build && cmake ${'\\'}
  -DCMAKE_BUILD_TYPE:STRING=Release ${'\\'}
  -DCMAKE_INSTALL_PREFIX:STRING=/usr ${'\\'}
  -DLLVM_TARGETS_TO_BUILD:STRING=X86 ${'\\'}
  ../llvm
RUN make -C llvm-build -j 12 && make -C llvm-build install && rm -rf llvm-build