I would like to propose that we make the default Clang Resource Directory /usr/lib/clang/${version}. The current default is /usr/lib${LLVM_LIBDIR_SUFFIX}/clang/${version}. LLVM_LIBDIR_SUFFIX is mainly used on 64-bit targets, where it is set to 64 to ensure that the libLLVM and libClang libraries get installed into /usr/lib64.
One of the main problems with having the Clang Resource Directory in /usr/lib64 is that the clang driver is unable to find 32-bit run-time libraries which are usually built with LLVM_LIBDIR_SUFFIX=“”, and end up installed to /usr/lib/clang/${version}. When clang is built with LLVM_LIBDIR_SUFFIX=64, it will only look for runtime libraries in /usr/lib64/clang/${version}.
There is also precedent for using /usr/lib for the resource directory. gcc uses /usr/lib/gcc/${triple}/${version} for its own ‘resource directory’
Linux distros like including Debian, Ubuntu, and Gentoo all use the /usr/lib prefix, and Fedora is planning to switch to /usr/lib for the Fedora-39 release.
Having a single standard value will not only fix the multilib issue mentioned above, but it will also simplify the build system and reduce the number of cmake option combinations that we need to support.
Thanks,
Tom