[PATCH] D80770: [diagtool] Install diagtool when LLVM_INSTALL_TOOLCHAIN_ONLY is ON.

2020-05-29 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment.

Thanks for the review, Jonas!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80770/new/

https://reviews.llvm.org/D80770



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D80770: [diagtool] Install diagtool when LLVM_INSTALL_TOOLCHAIN_ONLY is ON.

2020-05-29 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG03559c684a9b: [diagtool] Install diagtool when 
LLVM_INSTALL_TOOLCHAIN_ONLY is ON. (authored by vsapsai).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80770/new/

https://reviews.llvm.org/D80770

Files:
  clang/tools/diagtool/CMakeLists.txt


Index: clang/tools/diagtool/CMakeLists.txt
===
--- clang/tools/diagtool/CMakeLists.txt
+++ clang/tools/diagtool/CMakeLists.txt
@@ -2,7 +2,7 @@
   Support
   )
 
-add_clang_executable(diagtool
+add_clang_tool(diagtool
   diagtool_main.cpp
   DiagTool.cpp
   DiagnosticNames.cpp
@@ -17,15 +17,3 @@
   clangBasic
   clangFrontend
   )
-
-if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
-  install(TARGETS diagtool
-COMPONENT diagtool
-RUNTIME DESTINATION bin)
-
-  if (NOT LLVM_ENABLE_IDE)
-add_llvm_install_targets(install-diagtool
-  DEPENDS diagtool
-  COMPONENT diagtool)
-  endif()
-endif()


Index: clang/tools/diagtool/CMakeLists.txt
===
--- clang/tools/diagtool/CMakeLists.txt
+++ clang/tools/diagtool/CMakeLists.txt
@@ -2,7 +2,7 @@
   Support
   )
 
-add_clang_executable(diagtool
+add_clang_tool(diagtool
   diagtool_main.cpp
   DiagTool.cpp
   DiagnosticNames.cpp
@@ -17,15 +17,3 @@
   clangBasic
   clangFrontend
   )
-
-if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
-  install(TARGETS diagtool
-COMPONENT diagtool
-RUNTIME DESTINATION bin)
-
-  if (NOT LLVM_ENABLE_IDE)
-add_llvm_install_targets(install-diagtool
-  DEPENDS diagtool
-  COMPONENT diagtool)
-  endif()
-endif()
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D80770: [diagtool] Install diagtool when LLVM_INSTALL_TOOLCHAIN_ONLY is ON.

2020-05-28 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

Thanks, Volodymyr!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80770/new/

https://reviews.llvm.org/D80770



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D80770: [diagtool] Install diagtool when LLVM_INSTALL_TOOLCHAIN_ONLY is ON.

2020-05-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision.
vsapsai added reviewers: JDevlieghere, steven_wu.
Herald added subscribers: ributzka, dexonsmith, jkorous, mgorny.
Herald added a project: clang.

Not sure about other platforms but `install-xcode-toolchain` was already
including diagtool in the toolchain. This change makes it possible to
install diagtool during Apple's 2-stage build.

Instead of dropping `if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)` conditional
I've switched to `add_clang_tool` which handles install targets. Also a
few other clang tools like clang-format, clang-scan-deps are using this
macro, so it is good to be consistent.

rdar://problem/15386909


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80770

Files:
  clang/tools/diagtool/CMakeLists.txt


Index: clang/tools/diagtool/CMakeLists.txt
===
--- clang/tools/diagtool/CMakeLists.txt
+++ clang/tools/diagtool/CMakeLists.txt
@@ -2,7 +2,7 @@
   Support
   )
 
-add_clang_executable(diagtool
+add_clang_tool(diagtool
   diagtool_main.cpp
   DiagTool.cpp
   DiagnosticNames.cpp
@@ -17,15 +17,3 @@
   clangBasic
   clangFrontend
   )
-
-if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
-  install(TARGETS diagtool
-COMPONENT diagtool
-RUNTIME DESTINATION bin)
-
-  if (NOT LLVM_ENABLE_IDE)
-add_llvm_install_targets(install-diagtool
-  DEPENDS diagtool
-  COMPONENT diagtool)
-  endif()
-endif()


Index: clang/tools/diagtool/CMakeLists.txt
===
--- clang/tools/diagtool/CMakeLists.txt
+++ clang/tools/diagtool/CMakeLists.txt
@@ -2,7 +2,7 @@
   Support
   )
 
-add_clang_executable(diagtool
+add_clang_tool(diagtool
   diagtool_main.cpp
   DiagTool.cpp
   DiagnosticNames.cpp
@@ -17,15 +17,3 @@
   clangBasic
   clangFrontend
   )
-
-if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
-  install(TARGETS diagtool
-COMPONENT diagtool
-RUNTIME DESTINATION bin)
-
-  if (NOT LLVM_ENABLE_IDE)
-add_llvm_install_targets(install-diagtool
-  DEPENDS diagtool
-  COMPONENT diagtool)
-  endif()
-endif()
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits