Use new macos -std= flag in Metal compiler.

This commit is contained in:
Hans-Kristian Arntzen 2018-09-03 12:03:14 +02:00
parent ea65ec4ac6
commit 452a65324e

View File

@ -93,7 +93,7 @@ def validate_shader_msl(shader, opt):
try:
msl_os = 'macosx'
# msl_os = 'iphoneos'
subprocess.check_call(['xcrun', '--sdk', msl_os, 'metal', '-x', 'metal', '-std=osx-metal{}'.format('2.1' if msl21 else ('2.0' if msl2 else '1.2')), '-Werror', '-Wno-unused-variable', msl_path])
subprocess.check_call(['xcrun', '--sdk', msl_os, 'metal', '-x', 'metal', '-std=macos-metal{}'.format('2.1' if msl21 else ('2.0' if msl2 else '1.2')), '-Werror', '-Wno-unused-variable', msl_path])
print('Compiled Metal shader: ' + msl_path) # display after so xcrun FNF is silent
except OSError as oe:
if (oe.errno != errno.ENOENT): # Ignore xcrun not found error