INNER CODE UNIT · Python
print_msl_compiler_version
Hongtae/SwiftVVD · SupportPackages/SPIRV-Cross/Sources/test_shaders.py:102
def print_msl_compiler_version():
try:
if platform.system() == 'Darwin':
subprocess.check_call(['xcrun', '--sdk', 'iphoneos', 'metal', '--version'])
print('... are the Metal compiler characteristics.\n') # display after so xcrun FNF is silent
else:
# Use Metal Windows toolkit to test on Linux (Wine) and Windows.
print('Running on non-macOS system.')
subprocess.check_call(['metal', '-x', 'metal', '--version'])
except OSError as e:
if (e.errno != errno.ENOENT): # Ignore xcrun not found error
raise
print('Metal SDK is not present.\n')
except subprocess.CalledProcessError:
pass
def msl_compiler_supports_version(version):