[Lldb-commits] [llvm] [mlir] [compiler-rt] [lldb] [clang] [libcxxabi] [libcxx] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

Anton Rydahl via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 6 14:11:08 PST 2023


================
@@ -330,6 +330,23 @@ def getStdFlag(cfg, std):
         default=f"{shlex.quote(sys.executable)} {shlex.quote(str(Path(__file__).resolve().parent.parent.parent / 'run.py'))}",
         help="Custom executor to use instead of the configured default.",
         actions=lambda executor: [AddSubstitution("%{executor}", executor)],
+    ),
+    Parameter(
+        name="openmp_pstl_backend",
+        choices=[True, False],
+        type=bool,
+        default=False,
+        help="Enable the OpenMP compilation toolchain if the PSTL backend was set to OpenMP.",
+        actions=lambda enabled: [
+            AddCompileFlag("-fopenmp"),
----------------
AntonRydahl wrote:

I think there is unfortunately no better way of doing this at the moment, except for changing Clang. The problem is that OpenMP might already be shipped with the system, and then a lot of conflicts can happen if the wrong version of the OpenMP target library or the device runtime is picked up. But I agree that this is indeed not very user friendly and that it would be a lot nicer if Clang automatically did this.

https://github.com/llvm/llvm-project/pull/66968


More information about the lldb-commits mailing list