Skip to content

Commit 25e3d2b

Browse files
authored
Revert "[Libomp] Place generated OpenMP headers into build resource d… (#88083)
…irectory (#88007)" This reverts commit 8671429. This commit broke the flang build, so I'm reverting it. See the comments in merge request #88007 for more information.
1 parent 0e5a53c commit 25e3d2b

File tree

2 files changed

+9
-24
lines changed

2 files changed

+9
-24
lines changed

clang/test/Headers/Inputs/include/stdint.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,4 @@ typedef unsigned __INTPTR_TYPE__ uintptr_t;
1616
#error Every target should have __INTPTR_TYPE__
1717
#endif
1818

19-
#ifdef __INTPTR_MAX__
20-
#define INTPTR_MAX __INTPTR_MAX__
21-
#endif
22-
23-
#ifdef __UINTPTR_MAX__
24-
#define UINTPTR_MAX __UINTPTR_MAX__
25-
#endif
26-
2719
#endif /* STDINT_H */

openmp/runtime/src/CMakeLists.txt

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,12 @@
1010

1111
include(ExtendPath)
1212

13-
# The generated headers will be placed in clang's resource directory if present.
14-
if(${OPENMP_STANDALONE_BUILD})
15-
set(LIBOMP_HEADERS_INTDIR ${CMAKE_CURRENT_BINARY_DIR})
16-
else()
17-
set(LIBOMP_HEADERS_INTDIR ${LLVM_BINARY_DIR}/${LIBOMP_HEADERS_INSTALL_PATH})
18-
endif()
19-
2013
# Configure omp.h, kmp_config.h and omp-tools.h if necessary
21-
configure_file(${LIBOMP_INC_DIR}/omp.h.var ${LIBOMP_HEADERS_INTDIR}/omp.h @ONLY)
22-
configure_file(${LIBOMP_INC_DIR}/ompx.h.var ${LIBOMP_HEADERS_INTDIR}/ompx.h @ONLY)
23-
configure_file(kmp_config.h.cmake ${LIBOMP_HEADERS_INTDIR}/kmp_config.h @ONLY)
14+
configure_file(${LIBOMP_INC_DIR}/omp.h.var omp.h @ONLY)
15+
configure_file(${LIBOMP_INC_DIR}/ompx.h.var ompx.h @ONLY)
16+
configure_file(kmp_config.h.cmake kmp_config.h @ONLY)
2417
if(${LIBOMP_OMPT_SUPPORT})
25-
configure_file(${LIBOMP_INC_DIR}/omp-tools.h.var ${LIBOMP_HEADERS_INTDIR}/omp-tools.h @ONLY)
18+
configure_file(${LIBOMP_INC_DIR}/omp-tools.h.var omp-tools.h @ONLY)
2619
endif()
2720

2821
# Generate message catalog files: kmp_i18n_id.inc and kmp_i18n_default.inc
@@ -426,15 +419,15 @@ else()
426419
endif()
427420
install(
428421
FILES
429-
${LIBOMP_HEADERS_INTDIR}/omp.h
430-
${LIBOMP_HEADERS_INTDIR}/ompx.h
422+
${CMAKE_CURRENT_BINARY_DIR}/omp.h
423+
${CMAKE_CURRENT_BINARY_DIR}/ompx.h
431424
DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH}
432425
)
433426
if(${LIBOMP_OMPT_SUPPORT})
434-
install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH})
427+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH})
435428
# install under legacy name ompt.h
436-
install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h)
437-
set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_HEADERS_INTDIR} PARENT_SCOPE)
429+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h)
430+
set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
438431
endif()
439432
if(${BUILD_FORTRAN_MODULES})
440433
set (destination ${LIBOMP_HEADERS_INSTALL_PATH})

0 commit comments

Comments
 (0)