]> git.proxmox.com Git - llvm-toolchain.git/commit
Enable COMPILER_RT_DEFAULT_TARGET_ONLY for all archs
authorFaidon Liambotis <paravoid@debian.org>
Fri, 5 Jan 2024 15:30:57 +0000 (17:30 +0200)
committerFaidon Liambotis <paravoid@debian.org>
Mon, 8 Jan 2024 13:40:12 +0000 (15:40 +0200)
commit400d89390891a1e95eb15837baca64bf000a352b
tree43b3e71b4137bfd5c2c23d5e6ed1e309320854c1
parente20f4b1bbacbe7a5a3d9038caeb5e185f99bb565
Enable COMPILER_RT_DEFAULT_TARGET_ONLY for all archs

This commit does two things in one go:
1) Enable COMPILER_RT_DEFAULT_TARGET_ONLY for i386 and amd64:

Right now i386/amd64 are building compiler-rt for each other, in
addition to themselves.:
 - libclang-rt-17-dev:amd64 is also shipping the i386 builtins, and
   Depending on libc6-i386:amd64/lib32stdc++:amd64.
 - libclang-rt-17-dev:i386 is also shipping the x86_64 built-ins, and
   Depending on libc6-amd64:i386/lib64stdc++6:i386/lib64atomic1:i386.

Beyond the extra cruft in files and dependencies, this means that the
amd64/i386 packages are shipping conflicting files, and dpkg is refusing
to unpack one in the presence of the other (an RC bug in itself). This
is also identified by the multiarch hinter with the following message:
   libclang-rt-17-dev conflicts on 78 files starting with /usr/lib/llvm-17/lib/clang/17/lib/linux/ on amd64 <-> i386

Let users who want to build e.g. 32-bit binaries in amd64 use multi-arch
for this use case, by installing libclang-rt-17-dev:i386. The
alternative would be to support multi-lib, and ship additional packages
such as libclang-rt-17-dev-i386:amd64 (and vice-versa), but this feels
like an overkill. Multi-lib remains still a possibility with (Debian's)
clang's default, libgcc (lib32gcc/lib64gcc) as well.

2) Enable COMPILER_RT_DEFAULT_TARGET_ONLY unconditionally:

This was being passed in an opt-in basis, via STAGE_ALL_CMAKE_EXTRA for
the following architectures:
  * armel
  * armhf
  * powerpc
  * sparc
  * sparc64
  * s390x
  * mips64el
  * hurd-i386

So, with i386/amd64 also opting-in, this leaves only a few remaining
Debian architectures.

Furthermore, upon inspecting compiler-rt/cmake/base-config-ix.cmake, it
looks like the only architectures that are actually building for
additional (non-default) targets are i386, amd64, powerpc (note: not
ppc64el!), mips*, and arm. Turns out we've disabled that for all of them
now.

Therefore, pass COMPILER_RT_DEFAULT_TARGET_ONLY=ON to all architectures
unconditionally, and thus reduce an additional variation factor.
debian/rules