Lines Matching +full:clang +full:- +full:build
7 You can find a number of sources to build docker images with LLVM components in
8 ``llvm/utils/docker``. They can be used by anyone who wants to build the docker
12 We currently provide Dockerfiles with ``debian12`` and ``nvidia-cuda`` base images.
17 ----
24 -------------
37 Docker images are built from a so-called *Dockerfile*, a source file written in
38 a specialized language that defines instructions to be used when build
42 of RUN commands that have to be executed to build the image. When building a new
44 read-only and then add a writable overlay on top of it to keep track of all
45 filesystem modifications, performed while building your image. When the build
60 The interface to run the build is ``build_docker_image.sh`` script. It accepts a
70 control on how to run the build. It allows you to specify the projects to
74 Here's a very simple example of getting a docker image with clang binary,
77 .. code-block:: bash
80 --source debian12 \
81 --docker-repository clang-debian12 --docker-tag "staging" \
82 -p clang -i install-clang -i install-clang-resource-headers \
83 -- \
84 -DCMAKE_BUILD_TYPE=Release
86 Note that a build like that doesn't use a 2-stage build process that
87 you probably want for clang. Running a 2-stage build is a little more intricate,
90 .. code-block:: bash
92 # Run a 2-stage build.
96 --source debian12 \
97 --docker-repository clang-debian12 --docker-tag "staging" \
98 -p clang -i stage2-install-clang -i stage2-install-clang-resource-headers \
99 -- \
100 -DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \
101 -DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
102 -DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-resource-headers"
104 This will produce a new image ``clang-debian12:staging`` from the latest
109 .. code-block:: bash
111 docker run -ti clang-debian12:staging bash
115 .. code-block:: bash
117 root@80f351b51825:/# clang -v
118 clang version 19.1.7 (trunk 524462)
119 Target: x86_64-unknown-linux-gnu
120 Target: x86_64-unknown-linux-gnu
127 We currently provide two images: Debian12-based and nvidia-cuda-based. They
129 preinstalled binaries. Debian8 is very minimal, nvidia-cuda is larger, but has
133 If you need a minimal linux distribution with only clang and libstdc++ included,
134 you should try Debian12-based image.
137 you should choose nvidia-cuda-based image and use `nvidia-docker
138 <https://github.com/NVIDIA/nvidia-docker>`_ to run your docker containers. Note
139 that you don't need nvidia-docker to build the images, but you need it in order
143 If you have a different use-case, you could create your own image based on
147 run debian12 build on Fedora or any other Linux distribution. You don't need to
148 install CMake, compilers or any other clang dependencies. It is all handled
149 during the build process inside Docker's isolated environment.
151 Stable build
153 If you want a somewhat recent and somewhat stable build, use the
155 Debian12-based image using the latest ``google/stable`` sources for you:
157 .. code-block:: bash
160 -s debian12 --d clang-debian12 -t "staging" \
161 --branch branches/google/stable \
162 -p clang -i install-clang -i install-clang-resource-headers \
163 -- \
164 -DCMAKE_BUILD_TYPE=Release
171 To minimize the resulting image size we use `multi-stage Docker builds
172 <https://docs.docker.com/develop/develop-images/multistage-build/>`_.
174 build dependencies, checks out LLVM source code, compiles LLVM, etc.
175 The first image is only used during build and does not have a descriptive name,
176 i.e. it is only accessible via the hash value after the build is finished.
178 and not any build dependencies. It is also accessible via a descriptive name
179 (specified by -d and -t flags).