Closed sylvestre closed 6 months ago
@llvm/issue-subscribers-openmp
Author: Sylvestre Ledru (sylvestre)
Range: c3a41aac5f32..9632e1515c93
We probably dropped LLVM_INCLUDE_DIR
from somewhere when moving the headers around. it should likely be on the PUBLIC
include directories interface.
Hm, should be covered by the global include here https://github.com/llvm/llvm-project/blob/main/openmp/libomptarget/CMakeLists.txt#L44. Don't know why this would be different given the change.
Tried to copy the builder and it didn't reproduce. The logs contain -- Using LLVM include directories: /build/source/llvm/include;/build/source/build-llvm/include
which should normally include llvm/IR/Attributes.inc
. This is applied as a global include in the CMake and should be a target of include_directories
. However when I look at the compiler output I do not see -I/build/source/build-llvm/include
included for some reason.
Maybe applying it directly to that library helps?
diff --git a/openmp/libomptarget/plugins-nextgen/common/CMakeLists.txt b/openmp/libomptarget/plugins-nextgen/common/CMakeLists.txt
index 0420d0e6f1f8..b84f3d7b137c 100644
--- a/openmp/libomptarget/plugins-nextgen/common/CMakeLists.txt
+++ b/openmp/libomptarget/plugins-nextgen/common/CMakeLists.txt
@@ -60,6 +60,7 @@ target_link_options(PluginCommon PUBLIC ${offload_link_flags})
target_include_directories(PluginCommon PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${LIBOMPTARGET_LLVM_INCLUDE_DIRS}
${LIBOMPTARGET_INCLUDE_DIR}
)
I don't get this locally so it's difficult for me to triage.
I do not know if it will help you, but here is another buildbot failing with the same error: https://lab.llvm.org/buildbot/#/builders/270/builds/11899
I do not know if it will help you, but here is another buildbot failing with the same error: https://lab.llvm.org/buildbot/#/builders/270/builds/11899
Okay, I think this is due to some lack of dependencies on an LLVM thing. For some reason Attributes.def
isn't being created before we try to compile libomptarget
. I'm pretty sure if you keep mashing install it will eventually work since whatever target makes that file gets run. Will need to look into how to fix it.
My guess is that something was accidentally making this depend on tablegen. This goes away if you use LLVM_ENABLE_RUNTIMES=openmp
, (which is probably going to be the only supported option when this is moved to offload
). But it's definitely not ideal and this should depend on LLVM tablegen.
We probably want to disable libomptarget
in project build because 99% project build users only care about libomp
.
I have absolutely no clue how this wasn't failing before. The problem is that we can't just make it depend on intrinsics_gen
because that might not even exist as a target yet.
Okay adding the dependency seems to work even if it's not a registered target yet, another mystery of CMake. The flang
bot is green now. If this passes on your bot we can close this issue.
Thanks! https://lab.llvm.org/buildbot/#/builders/270 is green now.
On Linux Debian/Ubuntu, started very recently: