XCRUN
Two questions
- What version does xcrun use when not specified with 'std=ios-metal2.4'?
- How can I find out, if I want to use 'std=ios-metal...', what version to use?
Also is there somewhere documentation about all the xcrun command flags and what ios-metal version(s) run on what chipset (eg. A11 can run ios-metal...)? Can't seem to find them.
Test setup
I am building for a iPhone 8 running iOS version 13.5.1. The terminal commands I run (see below):
$ xcrun -sdk iphoneos metal -c -mios-version-min=13.5 MyLibrary.metal -o MyLibrary.air
$ xcrun -sdk iphoneos metallib MyLibrary.air -o MyLibrary.metallib
This builds and run on the device. But when I run it with the 'std=ios-metal2.4' flag (see below):
$ xcrun -sdk iphoneos metal -c -std=ios-metal2.4 -mios-version-min=13.5 MyLibrary.metal -o MyLibrary.air
$ xcrun -sdk iphoneos metallib MyLibrary.air -o MyLibrary.metallib
It does not build and run on the device. The error I get is this:
Error Domain=AGXMetalA11 Code=3 "Function myFunction is using language version 2.4 which is incompatible with this OS."