Skip to content

Commit 651d44d

Browse files
authored
[clang] Fix missing installed header (llvm#95979)
Since commit 8d468c1, the header `openmp_wrappers/complex` is hidden behind `openmp_wrappers/complex.h` due to a bug in CMake[^1], so is not actually installed. To test the issue, you can ask `ninja` to generate the file on your build: ``` $ ninja lib/clang/19/include/openmp_wrappers/complex.h [199/199] Copying clang's openmp_wrappers/complex.h... $ ninja lib/clang/19/include/openmp_wrappers/complex ninja: error: unknown target 'lib/clang/19/include/openmp_wrappers/complex', did you mean 'lib/clang/19/include/openmp_wrappers/complex.h'? ``` Re-ordering the entries workarounds the issue. The other option is to revert the cited commit, but I'm not sure which approach is preferred. CC @etcwilde @jdoerfert [^1]: [Here](https://gitlab.kitware.com/cmake/cmake/-/issues/26058) is the CMake report on the issue.
1 parent af6acd7 commit 651d44d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/lib/Headers/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,10 @@ set(ppc_wrapper_files
318318
set(openmp_wrapper_files
319319
openmp_wrappers/math.h
320320
openmp_wrappers/cmath
321-
openmp_wrappers/complex.h
321+
# Due to a bug in CMake, `complex` must be before `complex.h`
322+
# See: https://gitlab.kitware.com/cmake/cmake/-/issues/26058
322323
openmp_wrappers/complex
324+
openmp_wrappers/complex.h
323325
openmp_wrappers/__clang_openmp_device_functions.h
324326
openmp_wrappers/complex_cmath.h
325327
openmp_wrappers/new

0 commit comments

Comments
 (0)