| 1 |
# core_files list contains the headers shared by all platforms. |
| 2 |
# Please consider adding new platform specific headers |
| 3 |
# to platform specific lists below. |
| 4 |
set(core_files |
| 5 |
builtins.h |
| 6 |
float.h |
| 7 |
inttypes.h |
| 8 |
iso646.h |
| 9 |
limits.h |
| 10 |
module.modulemap |
| 11 |
stdalign.h |
| 12 |
stdarg.h |
| 13 |
__stdarg___gnuc_va_list.h |
| 14 |
__stdarg___va_copy.h |
| 15 |
__stdarg_header_macro.h |
| 16 |
__stdarg_va_arg.h |
| 17 |
__stdarg_va_copy.h |
| 18 |
__stdarg_va_list.h |
| 19 |
stdatomic.h |
| 20 |
stdbool.h |
| 21 |
stdckdint.h |
| 22 |
stddef.h |
| 23 |
__stddef_header_macro.h |
| 24 |
__stddef_max_align_t.h |
| 25 |
__stddef_null.h |
| 26 |
__stddef_nullptr_t.h |
| 27 |
__stddef_offsetof.h |
| 28 |
__stddef_ptrdiff_t.h |
| 29 |
__stddef_rsize_t.h |
| 30 |
__stddef_size_t.h |
| 31 |
__stddef_unreachable.h |
| 32 |
__stddef_wchar_t.h |
| 33 |
__stddef_wint_t.h |
| 34 |
stdint.h |
| 35 |
stdnoreturn.h |
| 36 |
tgmath.h |
| 37 |
unwind.h |
| 38 |
varargs.h |
| 39 |
) |
| 40 |
|
| 41 |
set(arm_common_files |
| 42 |
# Headers shared by Arm and AArch64 |
| 43 |
arm_acle.h |
| 44 |
) |
| 45 |
|
| 46 |
set(arm_only_files |
| 47 |
arm_cmse.h |
| 48 |
armintr.h |
| 49 |
) |
| 50 |
|
| 51 |
set(aarch64_only_files |
| 52 |
arm64intr.h |
| 53 |
arm_neon_sve_bridge.h |
| 54 |
) |
| 55 |
|
| 56 |
set(cuda_files |
| 57 |
__clang_cuda_builtin_vars.h |
| 58 |
__clang_cuda_math.h |
| 59 |
__clang_cuda_cmath.h |
| 60 |
__clang_cuda_complex_builtins.h |
| 61 |
__clang_cuda_device_functions.h |
| 62 |
__clang_cuda_intrinsics.h |
| 63 |
__clang_cuda_texture_intrinsics.h |
| 64 |
__clang_cuda_libdevice_declares.h |
| 65 |
__clang_cuda_math_forward_declares.h |
| 66 |
__clang_cuda_runtime_wrapper.h |
| 67 |
) |
| 68 |
|
| 69 |
set(hexagon_files |
| 70 |
hexagon_circ_brev_intrinsics.h |
| 71 |
hexagon_protos.h |
| 72 |
hexagon_types.h |
| 73 |
hvx_hexagon_protos.h |
| 74 |
) |
| 75 |
|
| 76 |
set(hip_files |
| 77 |
__clang_hip_libdevice_declares.h |
| 78 |
__clang_hip_cmath.h |
| 79 |
__clang_hip_math.h |
| 80 |
__clang_hip_stdlib.h |
| 81 |
__clang_hip_runtime_wrapper.h |
| 82 |
) |
| 83 |
|
| 84 |
set(hlsl_h |
| 85 |
hlsl.h |
| 86 |
) |
| 87 |
set(hlsl_subdir_files |
| 88 |
hlsl/hlsl_basic_types.h |
| 89 |
hlsl/hlsl_intrinsics.h |
| 90 |
) |
| 91 |
set(hlsl_files |
| 92 |
${hlsl_h} |
| 93 |
${hlsl_subdir_files} |
| 94 |
) |
| 95 |
|
| 96 |
set(loongarch_files |
| 97 |
larchintrin.h |
| 98 |
lasxintrin.h |
| 99 |
lsxintrin.h |
| 100 |
) |
| 101 |
|
| 102 |
set(mips_msa_files |
| 103 |
msa.h |
| 104 |
) |
| 105 |
|
| 106 |
set(opencl_files |
| 107 |
opencl-c.h |
| 108 |
opencl-c-base.h |
| 109 |
) |
| 110 |
|
| 111 |
set(ppc_files |
| 112 |
altivec.h |
| 113 |
) |
| 114 |
|
| 115 |
set(ppc_htm_files |
| 116 |
htmintrin.h |
| 117 |
htmxlintrin.h |
| 118 |
) |
| 119 |
|
| 120 |
set(riscv_files |
| 121 |
riscv_bitmanip.h |
| 122 |
riscv_crypto.h |
| 123 |
riscv_ntlh.h |
| 124 |
sifive_vector.h |
| 125 |
) |
| 126 |
|
| 127 |
set(systemz_files |
| 128 |
s390intrin.h |
| 129 |
vecintrin.h |
| 130 |
) |
| 131 |
|
| 132 |
set(ve_files |
| 133 |
velintrin.h |
| 134 |
velintrin_gen.h |
| 135 |
velintrin_approx.h |
| 136 |
) |
| 137 |
|
| 138 |
set(webassembly_files |
| 139 |
wasm_simd128.h |
| 140 |
) |
| 141 |
|
| 142 |
set(x86_files |
| 143 |
# Intrinsics |
| 144 |
adcintrin.h |
| 145 |
adxintrin.h |
| 146 |
ammintrin.h |
| 147 |
amxcomplexintrin.h |
| 148 |
amxfp16intrin.h |
| 149 |
amxintrin.h |
| 150 |
avx2intrin.h |
| 151 |
avx512bf16intrin.h |
| 152 |
avx512bitalgintrin.h |
| 153 |
avx512bwintrin.h |
| 154 |
avx512cdintrin.h |
| 155 |
avx512dqintrin.h |
| 156 |
avx512fintrin.h |
| 157 |
avx512fp16intrin.h |
| 158 |
avx512ifmaintrin.h |
| 159 |
avx512ifmavlintrin.h |
| 160 |
avx512vbmi2intrin.h |
| 161 |
avx512vbmiintrin.h |
| 162 |
avx512vbmivlintrin.h |
| 163 |
avx512vlbf16intrin.h |
| 164 |
avx512vlbitalgintrin.h |
| 165 |
avx512vlbwintrin.h |
| 166 |
avx512vlcdintrin.h |
| 167 |
avx512vldqintrin.h |
| 168 |
avx512vlfp16intrin.h |
| 169 |
avx512vlintrin.h |
| 170 |
avx512vlvbmi2intrin.h |
| 171 |
avx512vlvnniintrin.h |
| 172 |
avx512vlvp2intersectintrin.h |
| 173 |
avx512vnniintrin.h |
| 174 |
avx512vp2intersectintrin.h |
| 175 |
avx512vpopcntdqintrin.h |
| 176 |
avx512vpopcntdqvlintrin.h |
| 177 |
avxifmaintrin.h |
| 178 |
avxintrin.h |
| 179 |
avxneconvertintrin.h |
| 180 |
avxvnniint16intrin.h |
| 181 |
avxvnniint8intrin.h |
| 182 |
avxvnniintrin.h |
| 183 |
bmi2intrin.h |
| 184 |
bmiintrin.h |
| 185 |
cetintrin.h |
| 186 |
cldemoteintrin.h |
| 187 |
clflushoptintrin.h |
| 188 |
clwbintrin.h |
| 189 |
clzerointrin.h |
| 190 |
cmpccxaddintrin.h |
| 191 |
crc32intrin.h |
| 192 |
emmintrin.h |
| 193 |
enqcmdintrin.h |
| 194 |
f16cintrin.h |
| 195 |
fma4intrin.h |
| 196 |
fmaintrin.h |
| 197 |
fxsrintrin.h |
| 198 |
gfniintrin.h |
| 199 |
hresetintrin.h |
| 200 |
ia32intrin.h |
| 201 |
immintrin.h |
| 202 |
invpcidintrin.h |
| 203 |
keylockerintrin.h |
| 204 |
lwpintrin.h |
| 205 |
lzcntintrin.h |
| 206 |
mm3dnow.h |
| 207 |
mmintrin.h |
| 208 |
movdirintrin.h |
| 209 |
mwaitxintrin.h |
| 210 |
nmmintrin.h |
| 211 |
pconfigintrin.h |
| 212 |
pkuintrin.h |
| 213 |
pmmintrin.h |
| 214 |
popcntintrin.h |
| 215 |
prfchiintrin.h |
| 216 |
prfchwintrin.h |
| 217 |
ptrauth.h |
| 218 |
ptwriteintrin.h |
| 219 |
raointintrin.h |
| 220 |
rdpruintrin.h |
| 221 |
rdseedintrin.h |
| 222 |
rtmintrin.h |
| 223 |
serializeintrin.h |
| 224 |
sgxintrin.h |
| 225 |
sha512intrin.h |
| 226 |
shaintrin.h |
| 227 |
sm3intrin.h |
| 228 |
sm4intrin.h |
| 229 |
smmintrin.h |
| 230 |
tbmintrin.h |
| 231 |
tmmintrin.h |
| 232 |
tsxldtrkintrin.h |
| 233 |
uintrintrin.h |
| 234 |
usermsrintrin.h |
| 235 |
vaesintrin.h |
| 236 |
vpclmulqdqintrin.h |
| 237 |
waitpkgintrin.h |
| 238 |
wbnoinvdintrin.h |
| 239 |
__wmmintrin_aes.h |
| 240 |
wmmintrin.h |
| 241 |
__wmmintrin_pclmul.h |
| 242 |
x86gprintrin.h |
| 243 |
x86intrin.h |
| 244 |
xmmintrin.h |
| 245 |
xopintrin.h |
| 246 |
xsavecintrin.h |
| 247 |
xsaveintrin.h |
| 248 |
xsaveoptintrin.h |
| 249 |
xsavesintrin.h |
| 250 |
xtestintrin.h |
| 251 |
# others |
| 252 |
cet.h |
| 253 |
cpuid.h |
| 254 |
) |
| 255 |
|
| 256 |
set(windows_only_files |
| 257 |
intrin0.h |
| 258 |
intrin.h |
| 259 |
vadefs.h |
| 260 |
yvals_core.h |
| 261 |
) |
| 262 |
|
| 263 |
set(utility_files |
| 264 |
mm_malloc.h |
| 265 |
) |
| 266 |
|
| 267 |
set(files |
| 268 |
${core_files} |
| 269 |
${arm_common_files} |
| 270 |
${arm_only_files} |
| 271 |
${aarch64_only_files} |
| 272 |
${cuda_files} |
| 273 |
${hexagon_files} |
| 274 |
${hip_files} |
| 275 |
${loongarch_files} |
| 276 |
${mips_msa_files} |
| 277 |
${opencl_files} |
| 278 |
${ppc_files} |
| 279 |
${ppc_htm_files} |
| 280 |
${riscv_files} |
| 281 |
${systemz_files} |
| 282 |
${ve_files} |
| 283 |
${x86_files} |
| 284 |
${webassembly_files} |
| 285 |
${windows_only_files} |
| 286 |
${utility_files} |
| 287 |
) |
| 288 |
|
| 289 |
set(cuda_wrapper_files |
| 290 |
cuda_wrappers/algorithm |
| 291 |
cuda_wrappers/cmath |
| 292 |
cuda_wrappers/complex |
| 293 |
cuda_wrappers/new |
| 294 |
) |
| 295 |
|
| 296 |
set(cuda_wrapper_bits_files |
| 297 |
cuda_wrappers/bits/shared_ptr_base.h |
| 298 |
cuda_wrappers/bits/basic_string.h |
| 299 |
cuda_wrappers/bits/basic_string.tcc |
| 300 |
) |
| 301 |
|
| 302 |
set(ppc_wrapper_files |
| 303 |
ppc_wrappers/mmintrin.h |
| 304 |
ppc_wrappers/xmmintrin.h |
| 305 |
ppc_wrappers/mm_malloc.h |
| 306 |
ppc_wrappers/emmintrin.h |
| 307 |
ppc_wrappers/pmmintrin.h |
| 308 |
ppc_wrappers/tmmintrin.h |
| 309 |
ppc_wrappers/smmintrin.h |
| 310 |
ppc_wrappers/nmmintrin.h |
| 311 |
ppc_wrappers/bmiintrin.h |
| 312 |
ppc_wrappers/bmi2intrin.h |
| 313 |
ppc_wrappers/immintrin.h |
| 314 |
ppc_wrappers/x86intrin.h |
| 315 |
ppc_wrappers/x86gprintrin.h |
| 316 |
) |
| 317 |
|
| 318 |
set(openmp_wrapper_files |
| 319 |
openmp_wrappers/math.h |
| 320 |
openmp_wrappers/cmath |
| 321 |
# Due to a bug in CMake, `complex` must be before `complex.h` |
| 322 |
# See: https://gitlab.kitware.com/cmake/cmake/-/issues/26058 |
| 323 |
openmp_wrappers/complex |
| 324 |
openmp_wrappers/complex.h |
| 325 |
openmp_wrappers/__clang_openmp_device_functions.h |
| 326 |
openmp_wrappers/complex_cmath.h |
| 327 |
openmp_wrappers/new |
| 328 |
) |
| 329 |
|
| 330 |
set(llvm_libc_wrapper_files |
| 331 |
llvm_libc_wrappers/assert.h |
| 332 |
llvm_libc_wrappers/stdio.h |
| 333 |
llvm_libc_wrappers/stdlib.h |
| 334 |
llvm_libc_wrappers/string.h |
| 335 |
llvm_libc_wrappers/ctype.h |
| 336 |
llvm_libc_wrappers/inttypes.h |
| 337 |
llvm_libc_wrappers/time.h |
| 338 |
) |
| 339 |
|
| 340 |
set(zos_wrapper_files |
| 341 |
zos_wrappers/builtins.h |
| 342 |
) |
| 343 |
|
| 344 |
include(GetClangResourceDir) |
| 345 |
get_clang_resource_dir(output_dir PREFIX ${LLVM_LIBRARY_OUTPUT_INTDIR}/.. SUBDIR include) |
| 346 |
set(out_files) |
| 347 |
set(generated_files) |
| 348 |
|
| 349 |
set(arm_common_generated_files) |
| 350 |
set(arm_only_generated_files) |
| 351 |
set(aarch64_only_generated_files) |
| 352 |
set(riscv_generated_files) |
| 353 |
|
| 354 |
function(copy_header_to_output_dir src_dir file) |
| 355 |
set(src ${src_dir}/${file}) |
| 356 |
set(dst ${output_dir}/${file}) |
| 357 |
add_custom_command(OUTPUT ${dst} |
| 358 |
DEPENDS ${src} |
| 359 |
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} |
| 360 |
COMMENT "Copying clang's ${file}...") |
| 361 |
list(APPEND out_files ${dst}) |
| 362 |
set(out_files ${out_files} PARENT_SCOPE) |
| 363 |
endfunction(copy_header_to_output_dir) |
| 364 |
|
| 365 |
function(clang_generate_header td_option td_file out_file) |
| 366 |
clang_tablegen(${out_file} ${td_option} |
| 367 |
-I ${CLANG_SOURCE_DIR}/include/clang/Basic/ |
| 368 |
SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/${td_file}) |
| 369 |
|
| 370 |
copy_header_to_output_dir(${CMAKE_CURRENT_BINARY_DIR} ${out_file}) |
| 371 |
set(out_files ${out_files} PARENT_SCOPE) |
| 372 |
list(APPEND generated_files "${CMAKE_CURRENT_BINARY_DIR}/${out_file}") |
| 373 |
set(generated_files ${generated_files} PARENT_SCOPE) |
| 374 |
endfunction(clang_generate_header) |
| 375 |
|
| 376 |
|
| 377 |
# Copy header files from the source directory to the build directory |
| 378 |
foreach( f ${files} ${cuda_wrapper_files} ${cuda_wrapper_bits_files} |
| 379 |
${ppc_wrapper_files} ${openmp_wrapper_files} ${zos_wrapper_files} ${hlsl_files} |
| 380 |
${llvm_libc_wrapper_files}) |
| 381 |
copy_header_to_output_dir(${CMAKE_CURRENT_SOURCE_DIR} ${f}) |
| 382 |
endforeach( f ) |
| 383 |
|
| 384 |
# Generate header files and copy them to the build directory |
| 385 |
if(ARM IN_LIST LLVM_TARGETS_TO_BUILD OR AArch64 IN_LIST LLVM_TARGETS_TO_BUILD) |
| 386 |
# Generate arm_neon.h |
| 387 |
clang_generate_header(-gen-arm-neon arm_neon.td arm_neon.h) |
| 388 |
# Generate arm_fp16.h |
| 389 |
clang_generate_header(-gen-arm-fp16 arm_fp16.td arm_fp16.h) |
| 390 |
# Generate arm_sve.h |
| 391 |
clang_generate_header(-gen-arm-sve-header arm_sve.td arm_sve.h) |
| 392 |
# Generate arm_sme.h |
| 393 |
clang_generate_header(-gen-arm-sme-header arm_sme.td arm_sme.h) |
| 394 |
# Generate arm_bf16.h |
| 395 |
clang_generate_header(-gen-arm-bf16 arm_bf16.td arm_bf16.h) |
| 396 |
# Generate arm_mve.h |
| 397 |
clang_generate_header(-gen-arm-mve-header arm_mve.td arm_mve.h) |
| 398 |
# Generate arm_cde.h |
| 399 |
clang_generate_header(-gen-arm-cde-header arm_cde.td arm_cde.h) |
| 400 |
# Generate arm_vector_types.h |
| 401 |
clang_generate_header(-gen-arm-vector-type arm_neon.td arm_vector_types.h) |
| 402 |
|
| 403 |
# Add headers to target specific lists |
| 404 |
list(APPEND arm_common_generated_files |
| 405 |
"${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h" |
| 406 |
"${CMAKE_CURRENT_BINARY_DIR}/arm_fp16.h" |
| 407 |
) |
| 408 |
|
| 409 |
list(APPEND arm_only_generated_files |
| 410 |
"${CMAKE_CURRENT_BINARY_DIR}/arm_mve.h" |
| 411 |
"${CMAKE_CURRENT_BINARY_DIR}/arm_cde.h" |
| 412 |
) |
| 413 |
|
| 414 |
list(APPEND aarch64_only_generated_files |
| 415 |
"${CMAKE_CURRENT_BINARY_DIR}/arm_sve.h" |
| 416 |
"${CMAKE_CURRENT_BINARY_DIR}/arm_sme.h" |
| 417 |
"${CMAKE_CURRENT_BINARY_DIR}/arm_bf16.h" |
| 418 |
"${CMAKE_CURRENT_BINARY_DIR}/arm_vector_types.h" |
| 419 |
) |
| 420 |
endif() |
| 421 |
if(RISCV IN_LIST LLVM_TARGETS_TO_BUILD) |
| 422 |
# Generate riscv_vector.h |
| 423 |
clang_generate_header(-gen-riscv-vector-header riscv_vector.td riscv_vector.h) |
| 424 |
list(APPEND riscv_generated_files |
| 425 |
"${CMAKE_CURRENT_BINARY_DIR}/riscv_vector.h" |
| 426 |
) |
| 427 |
endif() |
| 428 |
|
| 429 |
|
| 430 |
# Check if the generated headers are included in a target specific lists |
| 431 |
# Currently, all generated headers are target specific. |
| 432 |
set(all_target_specific_generated_files |
| 433 |
${arm_common_generated_files} |
| 434 |
${arm_only_generated_files} |
| 435 |
${aarch64_only_generated_files} |
| 436 |
${riscv_generated_files}) |
| 437 |
foreach( f ${generated_files} ) |
| 438 |
if (NOT ${f} IN_LIST all_target_specific_generated_files) |
| 439 |
message(WARNING "${f} is a generated header but it is not included in any " |
| 440 |
"target specific header lists! The resource-headers " |
| 441 |
"distribtion target will be incorrect!") |
| 442 |
endif() |
| 443 |
endforeach( f ) |
| 444 |
|
| 445 |
function(add_header_target target_name file_list) |
| 446 |
add_library(${target_name} INTERFACE ${file_list}) |
| 447 |
set_target_properties(${target_name} PROPERTIES |
| 448 |
FOLDER "Clang/Resources" |
| 449 |
RUNTIME_OUTPUT_DIRECTORY "${output_dir}") |
| 450 |
endfunction() |
| 451 |
|
| 452 |
# The catch-all clang-resource-headers target |
| 453 |
add_library(clang-resource-headers INTERFACE ${out_files}) |
| 454 |
set_target_properties("clang-resource-headers" PROPERTIES |
| 455 |
FOLDER "Clang/Resources" |
| 456 |
RUNTIME_OUTPUT_DIRECTORY "${output_dir}") |
| 457 |
add_dependencies("clang-resource-headers" |
| 458 |
"core-resource-headers" |
| 459 |
"arm-common-resource-headers" |
| 460 |
"arm-resource-headers" |
| 461 |
"aarch64-resource-headers" |
| 462 |
"cuda-resource-headers" |
| 463 |
"hexagon-resource-headers" |
| 464 |
"hip-resource-headers" |
| 465 |
"hlsl-resource-headers" |
| 466 |
"loongarch-resource-headers" |
| 467 |
"mips-resource-headers" |
| 468 |
"ppc-resource-headers" |
| 469 |
"ppc-htm-resource-headers" |
| 470 |
"riscv-resource-headers" |
| 471 |
"systemz-resource-headers" |
| 472 |
"ve-resource-headers" |
| 473 |
"webassembly-resource-headers" |
| 474 |
"x86-resource-headers" |
| 475 |
"opencl-resource-headers" |
| 476 |
"openmp-resource-headers" |
| 477 |
"llvm-libc-resource-headers" |
| 478 |
"windows-resource-headers" |
| 479 |
"utility-resource-headers") |
| 480 |
|
| 481 |
# Core/common headers |
| 482 |
add_header_target("core-resource-headers" ${core_files}) |
| 483 |
add_header_target("arm-common-resource-headers" "${arm_common_files};${arm_common_generated_files}") |
| 484 |
|
| 485 |
# Architecture/platform specific targets |
| 486 |
add_header_target("arm-resource-headers" "${arm_only_files};${arm_only_generated_files}") |
| 487 |
add_header_target("aarch64-resource-headers" "${aarch64_only_files};${aarch64_only_generated_files}") |
| 488 |
add_header_target("cuda-resource-headers" "${cuda_files};${cuda_wrapper_files};${cuda_wrapper_bits_files}") |
| 489 |
add_header_target("hexagon-resource-headers" "${hexagon_files}") |
| 490 |
add_header_target("hip-resource-headers" "${hip_files}") |
| 491 |
add_header_target("loongarch-resource-headers" "${loongarch_files}") |
| 492 |
add_header_target("mips-resource-headers" "${mips_msa_files}") |
| 493 |
add_header_target("ppc-resource-headers" "${ppc_files};${ppc_wrapper_files}") |
| 494 |
add_header_target("ppc-htm-resource-headers" "${ppc_htm_files}") |
| 495 |
add_header_target("riscv-resource-headers" "${riscv_files};${riscv_generated_files}") |
| 496 |
add_header_target("systemz-resource-headers" "${systemz_files};${zos_wrapper_files}") |
| 497 |
add_header_target("ve-resource-headers" "${ve_files}") |
| 498 |
add_header_target("webassembly-resource-headers" "${webassembly_files}") |
| 499 |
add_header_target("x86-resource-headers" "${x86_files}") |
| 500 |
|
| 501 |
# Other header groupings |
| 502 |
add_header_target("hlsl-resource-headers" ${hlsl_files}) |
| 503 |
add_header_target("opencl-resource-headers" ${opencl_files}) |
| 504 |
add_header_target("llvm-libc-resource-headers" ${llvm_libc_wrapper_files}) |
| 505 |
add_header_target("openmp-resource-headers" ${openmp_wrapper_files}) |
| 506 |
add_header_target("windows-resource-headers" ${windows_only_files}) |
| 507 |
add_header_target("utility-resource-headers" ${utility_files}) |
| 508 |
|
| 509 |
get_clang_resource_dir(header_install_dir SUBDIR include) |
| 510 |
target_include_directories(clang-resource-headers INTERFACE |
| 511 |
$<BUILD_INTERFACE:${output_dir}> |
| 512 |
$<INSTALL_INTERFACE:${header_install_dir}>) |
| 513 |
set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS clang-resource-headers) |
| 514 |
|
| 515 |
############################################################# |
| 516 |
# Install rules for the catch-all clang-resource-headers target |
| 517 |
install( |
| 518 |
FILES ${files} ${generated_files} |
| 519 |
DESTINATION ${header_install_dir} |
| 520 |
COMPONENT clang-resource-headers) |
| 521 |
|
| 522 |
install( |
| 523 |
FILES ${cuda_wrapper_files} |
| 524 |
DESTINATION ${header_install_dir}/cuda_wrappers |
| 525 |
COMPONENT clang-resource-headers) |
| 526 |
|
| 527 |
install( |
| 528 |
FILES ${cuda_wrapper_bits_files} |
| 529 |
DESTINATION ${header_install_dir}/cuda_wrappers/bits |
| 530 |
COMPONENT clang-resource-headers) |
| 531 |
|
| 532 |
install( |
| 533 |
FILES ${ppc_wrapper_files} |
| 534 |
DESTINATION ${header_install_dir}/ppc_wrappers |
| 535 |
COMPONENT clang-resource-headers) |
| 536 |
|
| 537 |
install( |
| 538 |
FILES ${llvm_libc_wrapper_files} |
| 539 |
DESTINATION ${header_install_dir}/llvm_libc_wrappers |
| 540 |
COMPONENT clang-resource-headers) |
| 541 |
|
| 542 |
install( |
| 543 |
FILES ${openmp_wrapper_files} |
| 544 |
DESTINATION ${header_install_dir}/openmp_wrappers |
| 545 |
COMPONENT clang-resource-headers) |
| 546 |
|
| 547 |
install( |
| 548 |
FILES ${zos_wrapper_files} |
| 549 |
DESTINATION ${header_install_dir}/zos_wrappers |
| 550 |
COMPONENT clang-resource-headers) |
| 551 |
|
| 552 |
############################################################# |
| 553 |
# Install rules for separate header lists |
| 554 |
install( |
| 555 |
FILES ${core_files} |
| 556 |
DESTINATION ${header_install_dir} |
| 557 |
EXCLUDE_FROM_ALL |
| 558 |
COMPONENT core-resource-headers) |
| 559 |
|
| 560 |
install( |
| 561 |
FILES ${arm_common_files} ${arm_common_generated_files} |
| 562 |
DESTINATION ${header_install_dir} |
| 563 |
EXCLUDE_FROM_ALL |
| 564 |
COMPONENT arm-common-resource-headers) |
| 565 |
|
| 566 |
install( |
| 567 |
FILES ${arm_only_files} ${arm_only_generated_files} |
| 568 |
DESTINATION ${header_install_dir} |
| 569 |
EXCLUDE_FROM_ALL |
| 570 |
COMPONENT arm-resource-headers) |
| 571 |
|
| 572 |
install( |
| 573 |
FILES ${aarch64_only_files} ${aarch64_only_generated_files} |
| 574 |
DESTINATION ${header_install_dir} |
| 575 |
EXCLUDE_FROM_ALL |
| 576 |
COMPONENT aarch64-resource-headers) |
| 577 |
|
| 578 |
install( |
| 579 |
FILES ${cuda_wrapper_files} |
| 580 |
DESTINATION ${header_install_dir}/cuda_wrappers |
| 581 |
EXCLUDE_FROM_ALL |
| 582 |
COMPONENT cuda-resource-headers) |
| 583 |
|
| 584 |
install( |
| 585 |
FILES ${cuda_wrapper_bits_files} |
| 586 |
DESTINATION ${header_install_dir}/cuda_wrappers/bits |
| 587 |
EXCLUDE_FROM_ALL |
| 588 |
COMPONENT cuda-resource-headers) |
| 589 |
|
| 590 |
install( |
| 591 |
FILES ${cuda_files} |
| 592 |
DESTINATION ${header_install_dir} |
| 593 |
EXCLUDE_FROM_ALL |
| 594 |
COMPONENT cuda-resource-headers) |
| 595 |
|
| 596 |
install( |
| 597 |
FILES ${hexagon_files} |
| 598 |
DESTINATION ${header_install_dir} |
| 599 |
EXCLUDE_FROM_ALL |
| 600 |
COMPONENT hexagon-resource-headers) |
| 601 |
|
| 602 |
install( |
| 603 |
FILES ${hip_files} |
| 604 |
DESTINATION ${header_install_dir} |
| 605 |
EXCLUDE_FROM_ALL |
| 606 |
COMPONENT hip-resource-headers) |
| 607 |
|
| 608 |
install( |
| 609 |
FILES ${loongarch_files} |
| 610 |
DESTINATION ${header_install_dir} |
| 611 |
EXCLUDE_FROM_ALL |
| 612 |
COMPONENT loongarch-resource-headers) |
| 613 |
|
| 614 |
install( |
| 615 |
FILES ${mips_msa_files} |
| 616 |
DESTINATION ${header_install_dir} |
| 617 |
EXCLUDE_FROM_ALL |
| 618 |
COMPONENT mips-resource-headers) |
| 619 |
|
| 620 |
install( |
| 621 |
FILES ${ppc_wrapper_files} |
| 622 |
DESTINATION ${header_install_dir}/ppc_wrappers |
| 623 |
EXCLUDE_FROM_ALL |
| 624 |
COMPONENT ppc-resource-headers) |
| 625 |
|
| 626 |
install( |
| 627 |
FILES ${ppc_files} |
| 628 |
DESTINATION ${header_install_dir} |
| 629 |
EXCLUDE_FROM_ALL |
| 630 |
COMPONENT ppc-resource-headers) |
| 631 |
|
| 632 |
install( |
| 633 |
FILES ${ppc_htm_files} |
| 634 |
DESTINATION ${header_install_dir} |
| 635 |
EXCLUDE_FROM_ALL |
| 636 |
COMPONENT ppc-htm-resource-headers) |
| 637 |
|
| 638 |
install( |
| 639 |
FILES ${riscv_generated_files} |
| 640 |
DESTINATION ${header_install_dir} |
| 641 |
EXCLUDE_FROM_ALL |
| 642 |
COMPONENT riscv-resource-headers) |
| 643 |
|
| 644 |
install( |
| 645 |
FILES ${riscv_files} |
| 646 |
DESTINATION ${header_install_dir} |
| 647 |
EXCLUDE_FROM_ALL |
| 648 |
COMPONENT riscv-resource-headers) |
| 649 |
|
| 650 |
install( |
| 651 |
FILES ${systemz_files} |
| 652 |
DESTINATION ${header_install_dir} |
| 653 |
EXCLUDE_FROM_ALL |
| 654 |
COMPONENT systemz-resource-headers) |
| 655 |
|
| 656 |
install( |
| 657 |
FILES ${zos_wrapper_files} |
| 658 |
DESTINATION ${header_install_dir}/zos_wrappers |
| 659 |
EXCLUDE_FROM_ALL |
| 660 |
COMPONENT systemz-resource-headers) |
| 661 |
|
| 662 |
install( |
| 663 |
FILES ${ve_files} |
| 664 |
DESTINATION ${header_install_dir} |
| 665 |
EXCLUDE_FROM_ALL |
| 666 |
COMPONENT ve-resource-headers) |
| 667 |
|
| 668 |
install( |
| 669 |
FILES ${webassembly_files} |
| 670 |
DESTINATION ${header_install_dir} |
| 671 |
EXCLUDE_FROM_ALL |
| 672 |
COMPONENT webassembly-resource-headers) |
| 673 |
|
| 674 |
install( |
| 675 |
FILES ${x86_files} |
| 676 |
DESTINATION ${header_install_dir} |
| 677 |
EXCLUDE_FROM_ALL |
| 678 |
COMPONENT x86-resource-headers) |
| 679 |
|
| 680 |
if(NOT CLANG_ENABLE_HLSL) |
| 681 |
set(EXCLUDE_HLSL EXCLUDE_FROM_ALL) |
| 682 |
endif() |
| 683 |
|
| 684 |
install( |
| 685 |
FILES ${hlsl_h} |
| 686 |
DESTINATION ${header_install_dir} |
| 687 |
${EXCLUDE_HLSL} |
| 688 |
COMPONENT hlsl-resource-headers) |
| 689 |
|
| 690 |
install( |
| 691 |
FILES ${hlsl_subdir_files} |
| 692 |
DESTINATION ${header_install_dir}/hlsl |
| 693 |
${EXCLUDE_HLSL} |
| 694 |
COMPONENT hlsl-resource-headers) |
| 695 |
|
| 696 |
install( |
| 697 |
FILES ${opencl_files} |
| 698 |
DESTINATION ${header_install_dir} |
| 699 |
EXCLUDE_FROM_ALL |
| 700 |
COMPONENT opencl-resource-headers) |
| 701 |
|
| 702 |
install( |
| 703 |
FILES ${openmp_wrapper_files} |
| 704 |
DESTINATION ${header_install_dir}/openmp_wrappers |
| 705 |
EXCLUDE_FROM_ALL |
| 706 |
COMPONENT openmp-resource-headers) |
| 707 |
|
| 708 |
install( |
| 709 |
FILES ${openmp_wrapper_files} |
| 710 |
DESTINATION ${header_install_dir}/openmp_wrappers |
| 711 |
EXCLUDE_FROM_ALL |
| 712 |
COMPONENT openmp-resource-headers) |
| 713 |
|
| 714 |
install( |
| 715 |
FILES ${utility_files} |
| 716 |
DESTINATION ${header_install_dir} |
| 717 |
EXCLUDE_FROM_ALL |
| 718 |
COMPONENT utility-resource-headers) |
| 719 |
|
| 720 |
install( |
| 721 |
FILES ${windows_only_files} |
| 722 |
DESTINATION ${header_install_dir} |
| 723 |
EXCLUDE_FROM_ALL |
| 724 |
COMPONENT windows-resource-headers) |
| 725 |
############################################################# |
| 726 |
|
| 727 |
if (NOT LLVM_ENABLE_IDE) |
| 728 |
add_llvm_install_targets(install-clang-resource-headers |
| 729 |
DEPENDS clang-resource-headers |
| 730 |
COMPONENT clang-resource-headers) |
| 731 |
|
| 732 |
add_llvm_install_targets(install-core-resource-headers |
| 733 |
DEPENDS core-resource-headers |
| 734 |
COMPONENT core-resource-headers) |
| 735 |
add_llvm_install_targets(install-arm-common-resource-headers |
| 736 |
DEPENDS arm-common-resource-headers |
| 737 |
COMPONENT arm-common-resource-headers) |
| 738 |
add_llvm_install_targets(install-arm-resource-headers |
| 739 |
DEPENDS arm-resource-headers |
| 740 |
COMPONENT arm-resource-headers) |
| 741 |
add_llvm_install_targets(install-aarch64-resource-headers |
| 742 |
DEPENDS aarch64-resource-headers |
| 743 |
COMPONENT aarch64-resource-headers) |
| 744 |
add_llvm_install_targets(install-cuda-resource-headers |
| 745 |
DEPENDS cuda-resource-headers |
| 746 |
COMPONENT cuda-resource-headers) |
| 747 |
add_llvm_install_targets(install-hexagon-resource-headers |
| 748 |
DEPENDS hexagon-resource-headers |
| 749 |
COMPONENT hexagon-resource-headers) |
| 750 |
add_llvm_install_targets(install-hip-resource-headers |
| 751 |
DEPENDS hip-resource-headers |
| 752 |
COMPONENT hip-resource-headers) |
| 753 |
add_llvm_install_targets(install-mips-resource-headers |
| 754 |
DEPENDS mips-resource-headers |
| 755 |
COMPONENT mips-resource-headers) |
| 756 |
add_llvm_install_targets(install-ppc-resource-headers |
| 757 |
DEPENDS ppc-resource-headers |
| 758 |
COMPONENT ppc-resource-headers) |
| 759 |
add_llvm_install_targets(install-ppc-htm-resource-headers |
| 760 |
DEPENDS ppc-htm-resource-headers |
| 761 |
COMPONENT ppc-htm-resource-headers) |
| 762 |
add_llvm_install_targets(install-riscv-resource-headers |
| 763 |
DEPENDS riscv-resource-headers |
| 764 |
COMPONENT riscv-resource-headers) |
| 765 |
add_llvm_install_targets(install-systemz-resource-headers |
| 766 |
DEPENDS systemz-resource-headers |
| 767 |
COMPONENT systemz-resource-headers) |
| 768 |
add_llvm_install_targets(install-ve-resource-headers |
| 769 |
DEPENDS ve-resource-headers |
| 770 |
COMPONENT ve-resource-headers) |
| 771 |
add_llvm_install_targets(install-x86-resource-headers |
| 772 |
DEPENDS x86-resource-headers |
| 773 |
COMPONENT x86-resource-headers) |
| 774 |
add_llvm_install_targets(install-webassembly-resource-headers |
| 775 |
DEPENDS webassembly-resource-headers |
| 776 |
COMPONENT webassembly-resource-headers) |
| 777 |
|
| 778 |
add_llvm_install_targets(install-hlsl-resource-headers |
| 779 |
DEPENDS hlsl-resource-headers |
| 780 |
COMPONENT hlsl-resource-headers) |
| 781 |
add_llvm_install_targets(install-opencl-resource-headers |
| 782 |
DEPENDS opencl-resource-headers |
| 783 |
COMPONENT opencl-resource-headers) |
| 784 |
add_llvm_install_targets(install-openmp-resource-headers |
| 785 |
DEPENDS openmp-resource-headers |
| 786 |
COMPONENT openmp-resource-headers) |
| 787 |
add_llvm_install_targets(install-windows-resource-headers |
| 788 |
DEPENDS windows-resource-headers |
| 789 |
COMPONENT windows-resource-headers) |
| 790 |
add_llvm_install_targets(install-utility-resource-headers |
| 791 |
DEPENDS utility-resource-headers |
| 792 |
COMPONENT utility-resource-headers) |
| 793 |
endif() |
| 794 |
|
| 795 |
source_group("Clang Runtime Headers" FILES ${files}) |