[PATCH] D89357: [llvm] Make obj2yaml and yaml2obj LLVM utilities instead of tools

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 18:38:58 PDT 2020


JDevlieghere created this revision.
JDevlieghere added reviewers: arphaman, Bigcheese, labath.
Herald added subscribers: dexonsmith, mgorny.
Herald added a project: LLVM.
JDevlieghere requested review of this revision.

For testing purposes I need a way to build and install `FileCheck` and `yaml2obj`. I could either make `FileCheck` an LLVM tool or make `obj2yaml` and `yaml2obj` utilities.  I think the distinction is rather arbitrary but my understanding is that tools are things meant for the toolchain while utilities are more used for things like testing, which is the case here. The functional difference is that they'll end up in the `${LLVM_UTILS_INSTALL_DIR}` which defaults to the `${LLVM_TOOLS_INSTALL_DIR}`. Unless you specify a different value or you added `obj2yaml` and `yaml2obj` to `LLVM_TOOLCHAIN_TOOLS` this change should make no difference.

Another option would be to get rid of this distinction altogether and just have tools. This would simplify the CMake logic but would mean you could no longer specify a separate `${LLVM_UTILS_INSTALL_DIR}`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89357

Files:
  llvm/tools/obj2yaml/CMakeLists.txt
  llvm/tools/yaml2obj/CMakeLists.txt


Index: llvm/tools/yaml2obj/CMakeLists.txt
===================================================================
--- llvm/tools/yaml2obj/CMakeLists.txt
+++ llvm/tools/yaml2obj/CMakeLists.txt
@@ -3,6 +3,6 @@
   Support
   )
 
-add_llvm_tool(yaml2obj
+add_llvm_utility(yaml2obj
   yaml2obj.cpp
   )
Index: llvm/tools/obj2yaml/CMakeLists.txt
===================================================================
--- llvm/tools/obj2yaml/CMakeLists.txt
+++ llvm/tools/obj2yaml/CMakeLists.txt
@@ -7,7 +7,7 @@
   Support
   )
 
-add_llvm_tool(obj2yaml
+add_llvm_utility(obj2yaml
   obj2yaml.cpp
   coff2yaml.cpp
   dwarf2yaml.cpp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89357.298005.patch
Type: text/x-patch
Size: 618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201014/3379f353/attachment.bin>


More information about the llvm-commits mailing list