[PATCH] D83835: [flang] Fix out-of-tree build with missing acc_gen target
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 14 17:35:19 PDT 2020
clementval created this revision.
clementval added a reviewer: sscalpone.
Herald added subscribers: llvm-commits, sstefan1, mgorny.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
This pacth fix out-of-tree build of Flang after the introduction of acc_gen.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83835
Files:
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/LLVMConfig.cmake.in
Index: llvm/cmake/modules/LLVMConfig.cmake.in
===================================================================
--- llvm/cmake/modules/LLVMConfig.cmake.in
+++ llvm/cmake/modules/LLVMConfig.cmake.in
@@ -104,15 +104,18 @@
@llvm_config_include_buildtree_only_exports@
endif()
-# 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.
+# By creating intrinsics_gen, omp_gen and acc_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()
+if(NOT TARGET acc_gen)
+ add_custom_target(acc_gen)
+endif()
set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On)
include(${LLVM_CMAKE_DIR}/LLVM-Config.cmake)
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -891,7 +891,7 @@
# only an object library is built, and no module is built. This is specific to the Polly use case.
#
# The SUBPROJECT argument contains the LLVM project the plugin belongs
-# to. If set, the plugin will link statically by default it if the
+# to. If set, the plugin will link statically by default it if the
# project was enabled.
function(add_llvm_pass_plugin name)
cmake_parse_arguments(ARG
@@ -928,6 +928,9 @@
if (TARGET omp_gen)
add_dependencies(obj.${name} omp_gen)
endif()
+ if (TARGET acc_gen)
+ add_dependencies(obj.${name} acc_gen)
+ endif()
set_property(GLOBAL APPEND PROPERTY LLVM_STATIC_EXTENSIONS ${name})
elseif(NOT ARG_NO_MODULE)
add_llvm_library(${name} MODULE ${ARG_UNPARSED_ARGUMENTS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83835.278029.patch
Type: text/x-patch
Size: 1947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200715/5197b5de/attachment-0001.bin>
More information about the llvm-commits
mailing list