Clang appletvos deployment target

How do you set the deployment target when compiling code for Apple TV? If I use -mios-min-version or -mmacosx-min-version I get:

% xcrun --sdk appletvos clang -isysroot $(xcrun --sdk appletvos --show-sdk-path) -mios-version-min=13.0 test.c

clang: warning: using sysroot for 'AppleTVOS' but targeting 'iPhone' [-Wincompatible-sysroot]

ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.0.sdk/usr/lib/libSystem.tbd) built for tvOS

ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcache.dylib) built for tvOS

ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcommonCrypto.dylib) built for tvOS
...

If I leave off the -mios-min-version then the code is compiled for the latest appletvos SDK however I want to target an earlier version:

xcrun --sdk appletvos clang -isysroot $(xcrun --sdk appletvos --show-sdk-path) test.c
otool -l a.out
...
Load command 9
     cmd LC_UUID
 cmdsize 24
    uuid A9538E37-7DB1-3EEE-AD77-FAE9DBA8562D
Load command 10
      cmd LC_BUILD_VERSION
  cmdsize 32
 platform 3
    minos 15.0
      sdk 15.0
   ntools 1
     tool 3
  version 711.0
...

There doesn't appear to be a -mtvos-min-version?

Ah, it appears to be -target:

xcrun --sdk appletvsimulator clang -isysroot $(xcrun --sdk appletvsimulator --show-sdk-path) -target arm64-apple-tvos13.0-simulator test.c
Clang appletvos deployment target
 
 
Q