[Openmp-commits] [openmp] [OpenMP][CMake] Revert standalone build LIBOMP_HEADERS_INSTALL_PATH (PR #91243)
David Tenty via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 6 10:17:46 PDT 2024
https://github.com/daltenty created https://github.com/llvm/llvm-project/pull/91243
Revert the portion of https://github.com/llvm/llvm-project/pull/75125 which modified the LIBOMP_HEADERS_INSTALL_PATH in standalone build.
This change is harmful for real standalone builds (i.e. builds where we build openmp by itself), since it tries to overwrite the `omp.h` inside the build compiler. For all-in-one builds with clang, testing shows this change is unnecessary as https://github.com/llvm/llvm-project/pull/88007 already set up that build configuration so that omp.h will be put into the project build's `clang` resource directory.
>From 68876061325f771bfa4a8c8ff63667241a8b19a2 Mon Sep 17 00:00:00 2001
From: David Tenty <daltenty at ibm.com>
Date: Mon, 6 May 2024 11:19:03 -0400
Subject: [PATCH] [OpenMP][CMake] Revert standalone build
LIBOMP_HEADERS_INSTALL_PATH changes
Revert the portion of https://github.com/llvm/llvm-project/pull/75125 which touch the LIBOMP_HEADERS_INSTALL_PATH in standalone build.
This change is harmful for standalone builds, since it tries to overwrite the omp.h inside the build compiler. For all-in-one builds, I've confirmed this change is unncessary as https://github.com/llvm/llvm-project/pull/88007 already set it up so that omp.h will be put into the project build clang's resource directory.
---
openmp/CMakeLists.txt | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
index 95f2425db3ee6b..9097ca5623000c 100644
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -113,17 +113,7 @@ option(OPENMP_ENABLE_LIBOMP_PROFILING "Enable time profiling for libomp." OFF)
# Header install location
if(${OPENMP_STANDALONE_BUILD})
- if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- execute_process(
- OUTPUT_STRIP_TRAILING_WHITESPACE
- COMMAND ${CMAKE_CXX_COMPILER} --print-resource-dir
- RESULT_VARIABLE COMMAND_RETURN_CODE
- OUTPUT_VARIABLE COMPILER_RESOURCE_DIR
- )
- set(LIBOMP_HEADERS_INSTALL_PATH "${COMPILER_RESOURCE_DIR}/include")
- else()
- set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
- endif()
+ set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
else()
include(GetClangResourceDir)
get_clang_resource_dir(LIBOMP_HEADERS_INSTALL_PATH SUBDIR include)
More information about the Openmp-commits
mailing list