• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 gRPC authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15FROM ubuntu:latest
16
17RUN apt-get update && apt-get install -y \
18  cmake \
19  g++ \
20  gcc \
21  git \
22  make \
23  python \
24  && apt-get clean
25
26RUN git clone -b release_36 http://llvm.org/git/llvm.git
27RUN git clone -b release_36 http://llvm.org/git/clang.git
28RUN git clone -b release_36 http://llvm.org/git/compiler-rt.git
29RUN git clone -b release_36 http://llvm.org/git/clang-tools-extra.git
30RUN git clone -b release_36 http://llvm.org/git/libcxx.git
31RUN git clone -b release_36 http://llvm.org/git/libcxxabi.git
32
33RUN mv clang llvm/tools
34RUN mv compiler-rt llvm/projects
35RUN mv clang-tools-extra llvm/tools/clang/tools
36RUN mv libcxx llvm/projects
37RUN mv libcxxabi llvm/projects
38
39RUN mkdir llvm-build
40RUN cd llvm-build && cmake \
41  -DCMAKE_BUILD_TYPE:STRING=Release \
42  -DLLVM_TARGETS_TO_BUILD:STRING=X86 \
43  ../llvm
44RUN make -C llvm-build && make -C llvm-build install && rm -rf llvm-build
45
46CMD ["bash"]
47