[llvm] 3c72caf - Fix missing build dependencies on omp_gen
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 06:59:53 PDT 2020
Author: Jon Roelofs
Date: 2020-07-02T07:55:20-06:00
New Revision: 3c72cafdf407a5a74d98a025071019533a54a1e1
URL: https://github.com/llvm/llvm-project/commit/3c72cafdf407a5a74d98a025071019533a54a1e1
DIFF: https://github.com/llvm/llvm-project/commit/3c72cafdf407a5a74d98a025071019533a54a1e1.diff
LOG: Fix missing build dependencies on omp_gen
Differential Revision: https://reviews.llvm.org/D83003
Added:
Modified:
llvm/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/CMakeLists.txt
llvm/cmake/modules/LLVMConfig.cmake.in
llvm/lib/Transforms/IPO/CMakeLists.txt
llvm/unittests/Frontend/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 3c53cb99512d..de2887b64c2a 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1131,7 +1131,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
# Installing the headers needs to depend on generating any public
# tablegen'd headers.
- add_custom_target(llvm-headers DEPENDS intrinsics_gen)
+ add_custom_target(llvm-headers DEPENDS intrinsics_gen omp_gen)
set_target_properties(llvm-headers PROPERTIES FOLDER "Misc")
if (NOT LLVM_ENABLE_IDE)
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index b524b488ecf3..744c52e82f3b 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -925,6 +925,9 @@ function(add_llvm_pass_plugin name)
if (TARGET intrinsics_gen)
add_dependencies(obj.${name} intrinsics_gen)
endif()
+ if (TARGET omp_gen)
+ add_dependencies(obj.${name} omp_gen)
+ endif()
set_property(GLOBAL APPEND PROPERTY LLVM_STATIC_EXTENSIONS ${name})
elseif(NOT ARG_NO_MODULE)
add_llvm_library(${name} MODULE ${ARG_UNPARSED_ARGUMENTS})
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
index 1cef87a5e18d..4b8879f65fe4 100644
--- a/llvm/cmake/modules/CMakeLists.txt
+++ b/llvm/cmake/modules/CMakeLists.txt
@@ -28,6 +28,9 @@ endforeach(lib)
if(intrinsics_gen IN_LIST LLVM_COMMON_DEPENDS)
list(REMOVE_ITEM LLVM_COMMON_DEPENDS intrinsics_gen)
endif()
+if(omp_gen IN_LIST LLVM_COMMON_DEPENDS)
+ list(REMOVE_ITEM LLVM_COMMON_DEPENDS omp_gen)
+endif()
# Generate LLVMConfig.cmake for the build tree.
set(LLVM_CONFIG_CODE "
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index fa6082c7e397..c9a1c8131d2d 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -104,12 +104,15 @@ if(NOT TARGET LLVMSupport)
@llvm_config_include_buildtree_only_exports@
endif()
-# By creating intrinsics_gen here, subprojects that depend on LLVM's
+# By creating intrinsics_gen and omp_gen here, subprojects that depend on LLVM's
# tablegen-generated headers can always depend on this target whether building
# in-tree with LLVM or not.
if(NOT TARGET intrinsics_gen)
add_custom_target(intrinsics_gen)
endif()
+if(NOT TARGET omp_gen)
+ add_custom_target(omp_gen)
+endif()
set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On)
include(${LLVM_CMAKE_DIR}/LLVM-Config.cmake)
diff --git a/llvm/lib/Transforms/IPO/CMakeLists.txt b/llvm/lib/Transforms/IPO/CMakeLists.txt
index bec42276f27c..3f30c0289e8c 100644
--- a/llvm/lib/Transforms/IPO/CMakeLists.txt
+++ b/llvm/lib/Transforms/IPO/CMakeLists.txt
@@ -45,4 +45,5 @@ add_llvm_component_library(LLVMipo
DEPENDS
intrinsics_gen
+ omp_gen
)
diff --git a/llvm/unittests/Frontend/CMakeLists.txt b/llvm/unittests/Frontend/CMakeLists.txt
index b3ffaf90c47e..4b48945b2854 100644
--- a/llvm/unittests/Frontend/CMakeLists.txt
+++ b/llvm/unittests/Frontend/CMakeLists.txt
@@ -10,6 +10,9 @@ set(LLVM_LINK_COMPONENTS
add_llvm_unittest(LLVMFrontendTests
OpenMPContextTest.cpp
OpenMPIRBuilderTest.cpp
+
+ DEPENDS
+ omp_gen
)
target_link_libraries(LLVMFrontendTests PRIVATE LLVMTestingSupport)
More information about the llvm-commits
mailing list