[llvm-branch-commits] [ASan] Make dyld_insert_libraries_reexec work with internal shell (PR #168655)
Andrew Haberlandt via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Nov 18 23:13:02 PST 2025
================
@@ -8,3 +11,25 @@ def getRoot(config):
if root.target_os not in ["Darwin"]:
config.unsupported = True
+
+
+def get_product_version():
+ try:
+ version_process = subprocess.run(
+ ["sw_vers", "-productVersion"],
+ check=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ )
+ version_string = version_process.stdout.decode("utf-8").split("\n")[0]
+ version_split = version_string.split(".")
+ return (int(version_split[0]), int(version_split[1]))
+ except:
+ return (0, 0)
+
+
+macos_version_major, macos_version_minor = get_product_version()
+if macos_version_major > 10 and macos_version_minor > 11:
+ config.available_features.add("mac-os-10-11-or-higher")
----------------
ndrewh wrote:
I think we should only add this feature when `config.apple_platform == "osx"` ([ref](https://github.com/llvm/llvm-project/blob/afdc5093bb256180b3bec3ff827f21bf23d0f492/compiler-rt/test/lit.common.cfg.py#L411C39-L411C60)). This particular test has `// UNSUPPORTED: ios` so it does not break anything right now, but it's not ideal to have a feature set based on the host OS if we are running on a simulator/device.
https://github.com/llvm/llvm-project/pull/168655
More information about the llvm-branch-commits
mailing list