Skip to content

Commit 173ac73

Browse files
committed
readme: Rewrite the section on installing prebuilt toolchains
Explain what the different download options are, and prioritize the downloadable toolchain packages over docker images.
1 parent 133c93a commit 173ac73

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

README.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,44 @@ Clang on its own can also be used as compiler in the normal GNU binutils
1818
based environments though, so the main difference lies in replacing
1919
binutils with LLVM based tools.
2020

21-
Installation
22-
------------
23-
24-
Prebuilt docker linux images containing llvm-mingw are available from
25-
[Docker Hub](https://hub.docker.com/r/mstorsjo/llvm-mingw/), and
26-
prebuilt toolchains (both for use as cross compiler from linux, and
27-
for use on windows) are available for download on GitHub. The toolchains
28-
for windows come in 4 versions, one for each of the 4 supported
29-
architectures, but each one of them can target all 4 architectures.
21+
Releases
22+
--------
23+
24+
The [GitHub Releases](https://github.com/mstorsjo/llvm-mingw/releases)
25+
page contains prebuilt toolchains that can be downloaded and installed
26+
by just unpacking them.
27+
28+
They come primarily in two different forms; packages named
29+
`llvm-mingw-<version>-<crt>-ubuntu-<distro_version>-<arch>.tar.xz`
30+
are cross compilers, that can be run on Linux, compiling binaries
31+
for any of the 4 target Windows architectures. Packages named
32+
`llvm-mingw-<version>-<crt>-<arch>.zip` are native toolchains that
33+
run on Windows (with binaries in the specified architecture), but
34+
which all can compile binaries for any of the 4 architectures.
35+
36+
The cross compilers come in versions running on either x86_64 or
37+
aarch64. (They're built on Ubuntu, but hopefully do run on other
38+
contempory distributions as well.)
39+
40+
There are packages with two different choices of CRT (C runtime) - the
41+
primary target is UCRT (the Universal C Runtime). The UCRT
42+
is available preinstalled since Windows 10, but can be installed
43+
on top of Vista or newer. The other legacy alternative is `msvcrt`,
44+
which produces binaries for (and uses) msvcrt.dll, which is a
45+
built-in component in all versions of Windows. This allows running
46+
directly out of the box on older versions of Windows too, without
47+
ensuring that the UCRT is installed, but msvcrt.dll is generally
48+
less featureful.
49+
50+
In addition to the downloadable toolchain packges, there are also
51+
prebuilt docker linux images containing the llvm-mingw toolchain,
52+
available from [Docker Hub](https://hub.docker.com/r/mstorsjo/llvm-mingw/).
3053

3154
Building from source
3255
--------------------
3356

34-
The toolchain can be reproducibly built into a Docker image, or be
35-
built and installed in the host environment.
36-
37-
To build and install all components, just do:
57+
The toolchain can be compiled for installation in the current Unix
58+
environment, fetching sources as needed:
3859

3960
./build-all.sh <target-dir>
4061

@@ -43,7 +64,7 @@ aren't necessary after building, run:
4364

4465
./strip-llvm.sh <target-dir>
4566

46-
To build a Docker image with the toolchain, run:
67+
It can also be built, reproducibly, into a Docker image:
4768

4869
docker build .
4970

0 commit comments

Comments
 (0)