[compiler-rt] r298008 - Fix macOS version detection to also allow missing 3rd part of the version number.
Kuba Mracek via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 15:35:35 PDT 2017
Author: kuba.brecka
Date: Thu Mar 16 17:35:34 2017
New Revision: 298008
URL: http://llvm.org/viewvc/llvm-project?rev=298008&view=rev
Log:
Fix macOS version detection to also allow missing 3rd part of the version number.
Modified:
compiler-rt/trunk/test/lit.common.cfg
Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=298008&r1=298007&r2=298008&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Thu Mar 16 17:35:34 2017
@@ -126,10 +126,11 @@ if config.can_symbolize:
lit.util.usePlatformSdkOnDarwin(config, lit_config)
if config.host_os == 'Darwin':
+ osx_version = (10, 0, 0)
try:
osx_version = subprocess.check_output(["sw_vers", "-productVersion"])
osx_version = tuple(int(x) for x in osx_version.split('.'))
- config.darwin_osx_version = osx_version
+ 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')
@@ -142,6 +143,8 @@ if config.host_os == 'Darwin':
except:
pass
+ config.darwin_osx_version = osx_version
+
# Detect x86_64h
try:
output = subprocess.check_output(["sysctl", "hw.cpusubtype"])
More information about the llvm-commits
mailing list