]> granicus.if.org Git - llvm/commitdiff
Revert Autogenerate the shebang lines for tools/opt-viewer
authorReid Kleckner <rnk@google.com>
Tue, 27 Aug 2019 18:31:29 +0000 (18:31 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 27 Aug 2019 18:31:29 +0000 (18:31 +0000)
This reverts r369486 (git commit 8d18384809957cc923752e10a86adab129e3df48)

The opt-viewer tests don't pass after this change, and fixing them isn't
trivial. opt-viewer.py imports optmap, which requires adjusting
pythonpath, which is more work than I'm willing to do to fix forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370095 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
tools/opt-viewer/CMakeLists.txt
tools/opt-viewer/opt-diff.py [moved from tools/opt-viewer/opt-diff.py.in with 98% similarity]
tools/opt-viewer/opt-stats.py [moved from tools/opt-viewer/opt-stats.py.in with 98% similarity]
tools/opt-viewer/opt-viewer.py [moved from tools/opt-viewer/opt-viewer.py.in with 99% similarity]
tools/opt-viewer/optrecord.py [moved from tools/opt-viewer/optrecord.py.in with 99% similarity]

index 0e77e0ebdeb79e7960f0e3e3b45b830ee1ea37ab..678f1a74bdd14c7fed7c7501f9c1ce1711bc9838 100644 (file)
@@ -660,8 +660,6 @@ if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
   message(FATAL_ERROR "Python 2.7 or newer is required")
 endif()
 
-get_filename_component(PYTHON_BASENAME ${PYTHON_EXECUTABLE} NAME)
-
 ######
 # LLVMBuild Integration
 #
index 1864c2b60b18308a9db3c65f67d40b10b8e69f61..19b60693308201fbc0b530f6e92a1eddf725b1a3 100644 (file)
@@ -1,28 +1,13 @@
 set (files
-  "optpmap.py"
-  "style.css")
-
-set (generated_files
   "opt-diff.py"
   "opt-stats.py"
   "opt-viewer.py"
-  "optrecord.py")
-
-foreach (file ${generated_files})
-  configure_file(
-    ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in
-    ${CMAKE_CURRENT_BINARY_DIR}/${file})
-endforeach (file)
+  "optpmap.py"
+  "optrecord.py"
+  "style.css")
 
 foreach (file ${files})
   install(PROGRAMS ${file}
     DESTINATION share/opt-viewer
     COMPONENT opt-viewer)
 endforeach (file)
-
-
-foreach (file ${generated_files})
-  install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${file}
-    DESTINATION share/opt-viewer
-    COMPONENT opt-viewer)
-endforeach (file)
similarity index 98%
rename from tools/opt-viewer/opt-diff.py.in
rename to tools/opt-viewer/opt-diff.py
index a561bb626d0bc51b6b33a2e68af901de16b780d8..36e81a5d569a746567776da4f1aa57cbd5fc8570 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env @PYTHON_BASENAME@
+#!/usr/bin/env python
 
 from __future__ import print_function
 
similarity index 98%
rename from tools/opt-viewer/opt-stats.py.in
rename to tools/opt-viewer/opt-stats.py
index 4f102861663d8c2fddc7178608502489618a6953..f4ee3a7d44e63958dffc6ed7add97e5797a66f7c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env @PYTHON_BASENAME@
+#!/usr/bin/env python
 
 from __future__ import print_function
 
similarity index 99%
rename from tools/opt-viewer/opt-viewer.py.in
rename to tools/opt-viewer/opt-viewer.py
index 288e01ea1d18ee750da5d302bb72c955003b1e82..4c105886cfdf274b38f5ed3ce6539516971585e9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env @PYTHON_BASENAME@
+#!/usr/bin/env python
 
 from __future__ import print_function
 
similarity index 99%
rename from tools/opt-viewer/optrecord.py.in
rename to tools/opt-viewer/optrecord.py
index 79d377c34faa34d181a6a2d898ec6faf44d1ef79..f6fd772689a9c5479392a2c517ca0e56249a95d9 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env @PYTHON_BASENAME@
+#!/usr/bin/env python
 
 from __future__ import print_function