Skip to content

[clang][test] Specify value of -fopenmp=libomp for test. #150301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

rupprecht
Copy link
Collaborator

@rupprecht rupprecht commented Jul 23, 2025

libomp is the default value when unconfigured in cmake, but llvm can be configured to have libgomp be the default instead. Explicitly specify this value so the test does not fail when it assumes libomp is always the default.

This is needed for the test changes in #125556

`libomp` is the default value when unconfigured in cmake, but llvm can be configured to have libgomp be the default instead. Explicitly specify this value so the test does not fail when it assumes libomp is always the default.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Jul 23, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 23, 2025

@llvm/pr-subscribers-clang-driver

Author: Jordan Rupprecht (rupprecht)

Changes

libomp is the default value when unconfigured in cmake, but llvm can be configured to have libgomp be the default instead. Explicitly specify this value so the test does not fail when it assumes libomp is always the default.


Full diff: https://github.com/llvm/llvm-project/pull/150301.diff

1 Files Affected:

  • (modified) clang/test/Driver/offload-target.c (+1-1)
diff --git a/clang/test/Driver/offload-target.c b/clang/test/Driver/offload-target.c
index 123ecd3eb830e..23a2cf26eb192 100644
--- a/clang/test/Driver/offload-target.c
+++ b/clang/test/Driver/offload-target.c
@@ -10,7 +10,7 @@
 // RUN: | FileCheck %s -check-prefix=CUDA
 // CUDA: "nvptx64-nvidia-cuda" - "clang", inputs: ["[[INPUT:.+]]"], output: "[[NV_OBJ:.+]]"
 
-// RUN: %clang -### --offload-targets=amdgcn-amd-amdhsa,nvptx64-nvidia-cuda -fopenmp \
+// RUN: %clang -### --offload-targets=amdgcn-amd-amdhsa,nvptx64-nvidia-cuda -fopenmp=libomp \
 // RUN:   -Xarch_amdgcn --offload-arch=gfx90a -Xarch_nvptx64 --offload-arch=sm_89 \
 // RUN:   -nogpulib -nogpuinc %s -ccc-print-bindings 2>&1 \
 // RUN: | FileCheck %s -check-prefix=OPENMP

@llvmbot
Copy link
Member

llvmbot commented Jul 23, 2025

@llvm/pr-subscribers-clang

Author: Jordan Rupprecht (rupprecht)

Changes

libomp is the default value when unconfigured in cmake, but llvm can be configured to have libgomp be the default instead. Explicitly specify this value so the test does not fail when it assumes libomp is always the default.


Full diff: https://github.com/llvm/llvm-project/pull/150301.diff

1 Files Affected:

  • (modified) clang/test/Driver/offload-target.c (+1-1)
diff --git a/clang/test/Driver/offload-target.c b/clang/test/Driver/offload-target.c
index 123ecd3eb830e..23a2cf26eb192 100644
--- a/clang/test/Driver/offload-target.c
+++ b/clang/test/Driver/offload-target.c
@@ -10,7 +10,7 @@
 // RUN: | FileCheck %s -check-prefix=CUDA
 // CUDA: "nvptx64-nvidia-cuda" - "clang", inputs: ["[[INPUT:.+]]"], output: "[[NV_OBJ:.+]]"
 
-// RUN: %clang -### --offload-targets=amdgcn-amd-amdhsa,nvptx64-nvidia-cuda -fopenmp \
+// RUN: %clang -### --offload-targets=amdgcn-amd-amdhsa,nvptx64-nvidia-cuda -fopenmp=libomp \
 // RUN:   -Xarch_amdgcn --offload-arch=gfx90a -Xarch_nvptx64 --offload-arch=sm_89 \
 // RUN:   -nogpulib -nogpuinc %s -ccc-print-bindings 2>&1 \
 // RUN: | FileCheck %s -check-prefix=OPENMP

@rupprecht rupprecht merged commit 34447ef into llvm:main Jul 23, 2025
12 checks passed
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
`libomp` is the default value when unconfigured in cmake, but llvm can
be configured to have `libgomp` be the default instead. Explicitly
specify this value so the test does not fail when it assumes libomp is
always the default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants