[all-commits] [llvm/llvm-project] a70cf5: Reland: [clang] Adding Platform/Architecture Speci...
David Tenty via All-commits
all-commits at lists.llvm.org
Thu Apr 28 21:04:07 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a70cf56d20b956fc008d24420e14226127ba9f4a
https://github.com/llvm/llvm-project/commit/a70cf56d20b956fc008d24420e14226127ba9f4a
Author: Qiongsi Wu <qwu at ibm.com>
Date: 2022-04-29 (Fri, 29 Apr 2022)
Changed paths:
M clang/lib/Headers/CMakeLists.txt
Log Message:
-----------
Reland: [clang] Adding Platform/Architecture Specific Resource Header Installation Targets
The goal of this patch is to improve distribution build's flexibility to include only applicable header files.
Currently, the clang-resource-headers target contains nearly all the files in clang/lib/Headers. Most of these files are platform specific (e.g. immintrin.h is x86 specific). A distribution build will have to either include all the headers for all the platforms, or not include any headers. For example, if a distribution build for powerpc includes the clang-resource-headers target, it will include all the x86 specific headers, even-though the x86 specific headers cannot be used.
This patch breaks up the clang-resource-headers list to a core list and platform specific lists. With the patch, a distribution build can now include the ppc-resource-headers to include the headers applicable to the powerpc platform.
Specifically, one can now have
cmake ... LLVM_DISTRIBUTION_COMPONENTS="clang;ppc-resource-headers" ... ../llvm
ninja install-distribution then installs the powerpc headers.
Similarly, one can do
cmake ... LLVM_DISTRIBUTION_COMPONENTS="clang;x86-resource-headers" ... ../llvm
to include headers applicable to the x86 platform in a distribution installation.
To implement this behaviour, the patch does two things
It breaks up the long files header file list to a core list and platform specific lists.
It adds numerous platform specific installation targets.
Differential Revision: https://reviews.llvm.org/D123498
More information about the All-commits
mailing list