|
4 | 4 | # the `dist` directory as `mold-$version-$arch-linux.tar.gz` (e.g. |
5 | 5 | # `mold-2.40.0-x86_64-linux.tar.gz`). |
6 | 6 | # |
7 | | -# The mold executable created by this script is statically linked to |
8 | | -# libstdc++, but dynamically linked to libc, libm, libpthread and some |
9 | | -# other libraries, as these libraries are almost always available on any |
10 | | -# Linux system. We can't statically link libc because doing so would |
11 | | -# disable dlopen(), which is required to load the LTO linker plugin. |
12 | | -# |
13 | 7 | # This script aims to produce reproducible outputs. That means if you run |
14 | 8 | # the script twice on the same git commit, it should produce bit-for-bit |
15 | 9 | # identical binary files. This property is crucial as a countermeasure |
|
23 | 17 | # but that shouldn't be a big problem for us because we only need that |
24 | 18 | # site the first time. |
25 | 19 | # |
| 20 | +# The mold executable created by this script is statically linked to |
| 21 | +# libstdc++, but dynamically linked to libc, libm and a few other |
| 22 | +# libraries, as these libraries are almost always available on any |
| 23 | +# Linux system. We can't statically link libc because doing so would |
| 24 | +# disable dlopen(), which is required to load the LTO linker plugin. |
| 25 | +# |
26 | 26 | # We aim to use a reasonably old Debian version because we'll dynamically |
27 | 27 | # link glibc to mold, and a binary linked against a newer version of glibc |
28 | 28 | # won't work on a system with an older version of glibc. |
|
201 | 201 | version=$(sed -n 's/^project(mold VERSION \(.*\))/\1/p' CMakeLists.txt) |
202 | 202 | dest=mold-$version-$arch-linux |
203 | 203 |
|
204 | | -# Source tarballs available on GitHub don't contain .git history. |
| 204 | +# Source tarballs available on GitHub don't contain .git directory. |
205 | 205 | # Clone the repo if missing. |
206 | 206 | [ -d .git ] || git clone --branch v$version --depth 1 --bare https://github.com/rui314/mold .git |
207 | 207 |
|
|
0 commit comments