Plumb compiler version info through to built Python wheels. (#13214)

Fixes #13213
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7e0d443..2ff017a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -521,7 +521,7 @@
           output_dir: "${{ github.workspace }}/bindist"
           # Note when upgrading: Build just one Python version synced to our
           # minimum.
-          override_python_versions: cp38-cp38m
+          override_python_versions: cp38-cp38
         run: |
           ./build_tools/python_deploy/build_linux_packages.sh
 
diff --git a/compiler/setup.py b/compiler/setup.py
index 527f626..28d6b7d 100644
--- a/compiler/setup.py
+++ b/compiler/setup.py
@@ -148,6 +148,13 @@
   PACKAGE_VERSION = f"0.dev0+{git_versions.get('IREE') or '0'}"
 
 
+def get_cmake_version_info_args():
+  return [
+      f"-DIREE_RELEASE_VERSION:STRING={PACKAGE_VERSION}",
+      f"-DIREE_RELEASE_REVISION:STRING={git_versions.get('IREE') or '0'}",
+  ]
+
+
 def maybe_nuke_cmake_cache():
   # From run to run under pip, we can end up with different paths to ninja,
   # which isn't great and will confuse cmake. Detect if the location of
@@ -237,6 +244,7 @@
         # TODO(scotttodd): include IREE_TARGET_BACKEND_WEBGPU here (and in env)
         get_env_cmake_option("IREE_ENABLE_CPUINFO", "ON"),
     ]
+    cmake_args.extend(get_cmake_version_info_args())
 
     # These usually flow through the environment, but we add them explicitly
     # so that they show clearly in logs (getting them wrong can have bad