[compiler-rt] [compiler-rt] [Darwin] OS/feature detection should use the run-wrapper (PR #171167)
Andrew Haberlandt via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 10 11:05:54 PST 2025
================
@@ -561,27 +563,32 @@ def get_ios_commands_dir():
)
if config.target_os == "Darwin":
- osx_version = (10, 0, 0)
- try:
- osx_version = subprocess.check_output(
- ["sw_vers", "-productVersion"], universal_newlines=True
- )
- osx_version = tuple(int(x) for x in osx_version.split("."))
- if len(osx_version) == 2:
- osx_version = (osx_version[0], osx_version[1], 0)
- if osx_version >= (10, 11):
- config.available_features.add("osx-autointerception")
- config.available_features.add("osx-ld64-live_support")
- if osx_version >= (13, 1):
- config.available_features.add("jit-compatible-osx-swift-runtime")
- except subprocess.CalledProcessError:
- pass
+ if config.darwin_run_wrapper != "" and not config.apple_platform.endswith("sim"):
+ os_detection_prefix = [config.darwin_run_wrapper]
+ else:
+ # There is no simulator-specific sw_vers/sysctl, so we use the host OS version
+ os_detection_prefix = []
- config.darwin_osx_version = osx_version
----------------
ndrewh wrote:
@wrotki It was previously defined here.
https://github.com/llvm/llvm-project/pull/171167
More information about the llvm-commits
mailing list