It fittingly already making use of add_llvm_utility during target creation and is usually only used in conjunction with other (test) related utilities such as FileCheck and not, which are already in utils.
Details
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
60,040 ms | x64 debian > MLIR.Examples/standalone::test.toy |
Event Timeline
split-file seems to fit utils/ well. It is small and self-contained. utils mostly just uses LLVMSupport.
yaml2obj and obj2yaml, on the other hand, use the higher level LLVMObjectYAML/DebugInfoDWARF/etc. And they are now a bit similar to other binary utilities like llvm-readelf.
I tentatively agree with @MaskRay on this. Certainly, split-file is really intended for use as a test helper only. yaml2obj and obj2yaml though could have wider usage potentially (I myself have occasionally used one or the other to experiment with some things). As such, I think split-file to utils only would be best.
That all being said, I've not looked at the CMake. What's the difference between add_llvm_utility and whatever is used for the other tools like llvm-objdump etc?
See https://reviews.llvm.org/D130977, but the gist of it is essentially what CMake flags are used to control whether a target is built as well as installed.