[llvm] [AIX] Add git revision to .file string (PR #88164)

David Tenty via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 12:58:16 PDT 2024


================
@@ -1,4 +1,22 @@
 if not "PowerPC" in config.root.targets:
     config.unsupported = True
 
+import subprocess
+
 config.suffixes.add(".py")
+
+def get_revision(repo_path):
+    cmd = ['git', '-C', repo_path, 'rev-parse', 'HEAD']
+    try:
+        return subprocess.run(cmd, stdout=subprocess.PIPE, check=True).stdout.decode('ascii')
----------------
daltenty wrote:

nit: is the ascii here really right? what about if this runs on say z/OS?

https://github.com/llvm/llvm-project/pull/88164


More information about the llvm-commits mailing list