Commit 8e9a5051 authored by Valentin Clement's avatar Valentin Clement Committed by clementval
Browse files

[flang] Fix out-of-tree build with missing acc_gen target

This pacth fix out-of-tree build of Flang after the introduction of acc_gen.

Reviewed By: sscalpone

Differential Revision: https://reviews.llvm.org/D83835
parent 9aa3dca8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -928,6 +928,9 @@ function(add_llvm_pass_plugin name)
    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})
+6 −3
Original line number Diff line number Diff line
@@ -104,15 +104,18 @@ if(NOT TARGET LLVMSupport)
  @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)