[llvm] [offload] Permit redefining OPENMP_STANDALONE_BUILD (PR #157253)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 6 05:36:28 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Michał Górny (mgorny)
<details>
<summary>Changes</summary>
Permit redefining `OPENMP_STANDALONE_BUILD` to make it possible to build offload correctly via runtimes build (i.e. build where the top-level project is `runtimes`). This follows the same logic in `openmp` component.
---
Full diff: https://github.com/llvm/llvm-project/pull/157253.diff
1 Files Affected:
- (modified) offload/CMakeLists.txt (+2-1)
``````````diff
diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt
index 38fa77e41bb53..a16c7dff3fd04 100644
--- a/offload/CMakeLists.txt
+++ b/offload/CMakeLists.txt
@@ -4,7 +4,8 @@
cmake_minimum_required(VERSION 3.20.0)
set(LLVM_SUBPROJECT_TITLE "liboffload")
-if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+# Permit redefining OPENMP_STANDALONE_BUILD when doing a runtimes build.
+if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(OPENMP_STANDALONE_BUILD TRUE)
project(offload C CXX ASM)
else()
``````````
</details>
https://github.com/llvm/llvm-project/pull/157253
More information about the llvm-commits
mailing list