Advertisement
zinosat

0029-backport-clang-llvm-cmake-Fix-configure-for-packages-us

Jul 16th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake
  2. index c09a8423f9f..0a2aa3520ed 100644
  3. --- a/clang/cmake/modules/AddClang.cmake
  4. +++ b/clang/cmake/modules/AddClang.cmake
  5. @@ -133,14 +133,7 @@ macro(add_clang_tool name)
  6. add_clang_executable(${name} ${ARGN})
  7.  
  8. if (CLANG_BUILD_TOOLS)
  9. - if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
  10. - NOT LLVM_DISTRIBUTION_COMPONENTS)
  11. - set(export_to_clangtargets EXPORT ClangTargets)
  12. - set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True)
  13. - endif()
  14. -
  15. install(TARGETS ${name}
  16. - ${export_to_clangtargets}
  17. RUNTIME DESTINATION bin
  18. COMPONENT ${name})
  19.  
  20. @@ -149,7 +142,6 @@ macro(add_clang_tool name)
  21. DEPENDS ${name}
  22. COMPONENT ${name})
  23. endif()
  24. - set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
  25. endif()
  26. endmacro()
  27.  
  28. diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
  29. index c0f90ba7068..77d4f9fe4b1 100644
  30. --- a/llvm/cmake/modules/AddLLVM.cmake
  31. +++ b/llvm/cmake/modules/AddLLVM.cmake
  32. @@ -881,14 +881,7 @@ macro(add_llvm_tool name)
  33.  
  34. if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
  35. if( LLVM_BUILD_TOOLS )
  36. - if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
  37. - NOT LLVM_DISTRIBUTION_COMPONENTS)
  38. - set(export_to_llvmexports EXPORT LLVMExports)
  39. - set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
  40. - endif()
  41. -
  42. install(TARGETS ${name}
  43. - ${export_to_llvmexports}
  44. RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
  45. COMPONENT ${name})
  46.  
  47. @@ -899,9 +892,6 @@ macro(add_llvm_tool name)
  48. endif()
  49. endif()
  50. endif()
  51. - if( LLVM_BUILD_TOOLS )
  52. - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
  53. - endif()
  54. set_target_properties(${name} PROPERTIES FOLDER "Tools")
  55. endmacro(add_llvm_tool name)
  56.  
  57. diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
  58. index d1afcb42f9d..4684654daf9 100644
  59. --- a/llvm/cmake/modules/TableGen.cmake
  60. +++ b/llvm/cmake/modules/TableGen.cmake
  61. @@ -170,14 +170,7 @@ macro(add_tablegen target project)
  62. endif()
  63.  
  64. if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
  65. - if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
  66. - NOT LLVM_DISTRIBUTION_COMPONENTS)
  67. - set(export_to_llvmexports EXPORT LLVMExports)
  68. - endif()
  69. -
  70. install(TARGETS ${target}
  71. - ${export_to_llvmexports}
  72. RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})
  73. endif()
  74. - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
  75. endmacro()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement