Directory where x86 runtimes are installed

If one follows the bootstrap instructions for building the runtime libraries for x86 using the triples -DLLVM_RUNTIME_TARGETS=x86_64-unknown-linux-gnu;i386-unknown-linux-gnu, libc++ ends up in <install>/lib/x86_64-unknown-linux-gnu and <install>/lib/i386-unknown-linux-gnu for 64-bit and 32-bit respectively.

We are used to having our x86 installation like this:

<install>/bin contains clang and other 64-bit executables (no 32-bit executables are built).

<install>/lib64 and <install>/lib contain libraries for 64-bit and 32-bit respectively.

Previously, I could build 64-bit using -DLLVM_LIBDIR_SUFFIX=64 and then separately build 32-bit libraries without using the suffix variable but with -DLLVM_BUILD_32_BITS=ON. Now -DLLVM_BUILD_32_BITS is not supported for runtimes and -DLLVM_RUNTIME_TARGETS=... is supposed to be used instead.

How can I get the 32-bit and 64-bit libraries to go into lib and lib64 in the installation directory? Are there any cmake configuration options for this? Or is the only option a post-build script to move things around.

The bootstrapping build defaults to multiarch layout which is controlled by the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR option. You could disable it, but you will likely need additional options to achieve the exact layout you described.

-DLLVM_LIBDIR_SUFFIX=64 is related to GCC multilib scheme. It has several drawbacks, so I strongly discourage it for filesystem hierarchies controllable by Clang (for system paths they are controlled by GCC and we have to play the house rule): Compiler driver and cross compilation | MaskRay