Skip to content

release/22.x: [openmp] Allow testing OpenMP in runtimes builds without a full clang build tree#183054

Merged
dyung merged 1 commit intollvm:release/22.xfrom
mstorsjo:openmp-test-clang-22.x
Mar 5, 2026
Merged

release/22.x: [openmp] Allow testing OpenMP in runtimes builds without a full clang build tree#183054
dyung merged 1 commit intollvm:release/22.xfrom
mstorsjo:openmp-test-clang-22.x

Conversation

@mstorsjo
Copy link
Member

@mstorsjo mstorsjo commented Feb 24, 2026

Having a build tree with "not" and "FileCheck" is still required, but if Clang/Flang isn't configured in that build, run the tests with the same compiler CMake uses. This is how testing worked in the standalone build configurations that now have been removed.

This is a manually adapted backport of 48a5119 / #182470 to the 22.x release branch.

This allows testing OpenMP in the same way on both git main and the 22.x release branch.

@mstorsjo mstorsjo requested a review from Meinersbur February 24, 2026 13:23
@mstorsjo mstorsjo added this to the LLVM 22.x Release milestone Feb 24, 2026
@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status Feb 24, 2026
@llvmbot llvmbot added openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime labels Feb 24, 2026
Copy link
Member

@Meinersbur Meinersbur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expected this to be mostly a backport of #182470. What are the changes to omptest for?

Consider writing a summary.

@mstorsjo
Copy link
Member Author

I expected this to be mostly a backport of #182470.

Yeah; this is an adapted backport of that one, plus a straight cherrypick of d5fea7e.

What are the changes to omptest for?

It's for getting this snippet:

# Only support OpenMP runtime 'bootstrap' build mode.
# Check as seen in 'runtimes/CMakeLists.txt', due to passing HAVE_LLVM_LIT to
# llvm_ExternalProject_Add() only.
if (NOT HAVE_LLVM_LIT)
  message(STATUS "Skipping omptest build. Reason: Only supported in bootstrap"
                 " build mode of OpenMP runtime.")
  return()
endif()

Without that, testing fails in the runtimes builds, if OMPT is supported, with this error:

ninja: error: '/home/martin/code/llvm-project/llvm/build-testtools-only/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it

Consider writing a summary.

Ok, will do. (PRs to release branches aren't squashed, but the individual commits of the PR are preserved as such, so the final merged form of the PR is seen in the individual commits. But I'll summarize the reasoning in the PR description.

@Meinersbur Meinersbur requested a review from c-rhodes February 25, 2026 08:12
@mstorsjo
Copy link
Member Author

@Meinersbur While this also is pending a release manager to approve/merge, I don't think they'll look at it until it is approved by you (or someone else) first.

@Meinersbur
Copy link
Member

I think this should be two different PRs. While personally I do not care, but I think it makes it easier to not lose track of what has been backported, but I don't know how important it is to the release manager.

See the workflow described at https://llvm.org/docs/GitHub.html#backporting-fixes-to-the-release-branches.

@mstorsjo
Copy link
Member Author

I think this should be two different PRs. While personally I do not care, but I think it makes it easier to not lose track of what has been backported, but I don't know how important it is to the release manager.

Ok, fair enough.

See the workflow described at https://llvm.org/docs/GitHub.html#backporting-fixes-to-the-release-branches.

Yes, I'm aware of that workflow. That's easy for the patches that apply cleanly, but for backporting my commit, it won't apply as is due to standalone builds still being supported in 22.x, so I'll have to do that one as a custom PR (like this one).

@mstorsjo mstorsjo force-pushed the openmp-test-clang-22.x branch from 0d6f14f to 73391f9 Compare February 27, 2026 17:17
@mstorsjo
Copy link
Member Author

I split off the other change into its own backport PR, #183775, and updated this one to only be a backport of #182470.

@dyung dyung moved this from Needs Triage to Needs Review in LLVM Release Status Feb 28, 2026
@mstorsjo
Copy link
Member Author

mstorsjo commented Mar 3, 2026

Ping @Meinersbur - can you ack this backport now?

Copy link
Member

@Meinersbur Meinersbur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation bot moved this from Needs Review to Needs Merge in LLVM Release Status Mar 4, 2026
@dyung
Copy link
Collaborator

dyung commented Mar 5, 2026

I split off the other change into its own backport PR, #183775, and updated this one to only be a backport of #182470.

Do these changes need to go in together, and/or in a certain order? I can merge this change in, but the other needs manual intervention at the moment since it is an llvmbot branch and I'm having issues force-pushing to those branches.

@mstorsjo
Copy link
Member Author

mstorsjo commented Mar 5, 2026

I split off the other change into its own backport PR, #183775, and updated this one to only be a backport of #182470.

Do these changes need to go in together, and/or in a certain order? I can merge this change in, but the other needs manual intervention at the moment since it is an llvmbot branch and I'm having issues force-pushing to those branches.

No, they're independent and can be merged in any order.

… build tree

Having a build tree with "not" and "FileCheck" is still required, but if
Clang/Flang isn't configured in that build, run the tests with the same
compiler CMake uses. This is how testing worked in the standalone build
configurations that now have been removed.

This is a manually adapted backport of
48a5119 / llvm#182470 to the 22.x
release branch.

This allows testing OpenMP in the same way on both git main
and the 22.x release branch.
@dyung dyung force-pushed the openmp-test-clang-22.x branch from 73391f9 to 9794a79 Compare March 5, 2026 16:35
@dyung dyung merged commit 9794a79 into llvm:release/22.x Mar 5, 2026
1 of 3 checks passed
@github-project-automation github-project-automation bot moved this from Needs Merge to Done in LLVM Release Status Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime

Projects

Development

Successfully merging this pull request may close these issues.

4 participants