[opt-viewer] Move under tools, install it
authorAdam Nemet <anemet@apple.com>
Thu, 6 Jul 2017 17:51:15 +0000 (17:51 +0000)
committerAdam Nemet <anemet@apple.com>
Thu, 6 Jul 2017 17:51:15 +0000 (17:51 +0000)
We weren't installing opt-viewer and co before, this fixes the omission.  I am
also moving the tools from utils/ to tools/.  I believe that this is more
appropriate since these tools have matured greatly in the past year through
contributions by multiple people (thanks!) so they are ready to become
external tools.

The tools are installed under <install>/share/opt-viewer/.

I am *not* adding the llvm- prefix.  If people feel strongly about adding
that, this is probably a good time since the new location will require some
mental adjustment anyway.

Fixes PR33521

Differential Revision: https://reviews.llvm.org/D35048

llvm-svn: 307285

llvm/tools/opt-viewer/CMakeLists.txt [new file with mode: 0644]
llvm/tools/opt-viewer/opt-diff.py [moved from llvm/utils/opt-viewer/opt-diff.py with 100% similarity]
llvm/tools/opt-viewer/opt-stats.py [moved from llvm/utils/opt-viewer/opt-stats.py with 100% similarity]
llvm/tools/opt-viewer/opt-viewer.py [moved from llvm/utils/opt-viewer/opt-viewer.py with 100% similarity]
llvm/tools/opt-viewer/optpmap.py [moved from llvm/utils/opt-viewer/optpmap.py with 100% similarity]
llvm/tools/opt-viewer/optrecord.py [moved from llvm/utils/opt-viewer/optrecord.py with 100% similarity]
llvm/tools/opt-viewer/style.css [moved from llvm/utils/opt-viewer/style.css with 100% similarity]

diff --git a/llvm/tools/opt-viewer/CMakeLists.txt b/llvm/tools/opt-viewer/CMakeLists.txt
new file mode 100644 (file)
index 0000000..19b6069
--- /dev/null
@@ -0,0 +1,13 @@
+set (files
+  "opt-diff.py"
+  "opt-stats.py"
+  "opt-viewer.py"
+  "optpmap.py"
+  "optrecord.py"
+  "style.css")
+
+foreach (file ${files})
+  install(PROGRAMS ${file}
+    DESTINATION share/opt-viewer
+    COMPONENT opt-viewer)
+endforeach (file)