[Openmp-commits] [openmp] [OpenMP] Add target to build OpenMP runtime (PR #189557)

Jan Patrick Lehr via Openmp-commits openmp-commits at lists.llvm.org
Tue Mar 31 01:06:26 PDT 2026


https://github.com/jplehr created https://github.com/llvm/llvm-project/pull/189557

This adds a top-level target to build the OpenMP runtime, similar to what was done in https://github.com/llvm/llvm-project/pull/186099 for the Offload runtime.

Having this top-level target enables us to execute the build in the pre-commit CI as shown in https://github.com/llvm/llvm-project/pull/174955 (I actually just cherry-picked the commit from that branch)

>From 2cb1cbedec0c439ca018354308e03401db86aff8 Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Wed, 11 Mar 2026 06:55:10 -0500
Subject: [PATCH] Add target to build OpenMP runtime

---
 openmp/CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
index 25d2152827ba0..0161eb31f2790 100644
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -176,3 +176,11 @@ else()
   # Now that we have seen all testsuites, create the check-openmp target.
   construct_check_openmp_target()
 endif()
+
+# Target to be invoked by the pre-merge CI to build the OpenMP runtime library.
+add_custom_target(openmp ALL
+  COMMENT "OpenMP meta-target. Use 'make openmp' to build all OpenMP targets."
+  )
+if(TARGET omp)
+  add_dependencies(openmp omp)
+endif()



More information about the Openmp-commits mailing list