@@ -6,7 +6,7 @@ diff -ur libffi-3.4.7 2/config.sub libffi-3.4.7/config.sub
66 | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
77 | hiux* | abug | nacl* | netware* | windows* \
88- | os9* | macos* | osx* | ios* | tvos* | watchos* \
9- + | os9* | macos* | osx* | ios* | tvos* | watchos* | xros* \
9+ + | os9* | macos* | osx* | ios* | tvos* | watchos* | xros* | visionos* \
1010 | mpw* | magic* | mmixware* | mon960* | lnews* \
1111 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1212 | aos* | aros* | cloudabi* | sortix* | twizzler* \
@@ -15,7 +15,7 @@ diff -ur libffi-3.4.7 2/config.sub libffi-3.4.7/config.sub
1515 os2-emx-)
1616 ;;
1717- ios*-simulator* | tvos*-simulator* | watchos*-simulator*)
18- + ios*-simulator* | tvos*-simulator* | watchos*-simulator* | xros*-simulator*)
18+ + ios*-simulator* | tvos*-simulator* | watchos*-simulator* | xros*-simulator* | visionos*-simulator* )
1919 ;;
2020 *-eabi*- | *-gnueabi*-)
2121 ;;
@@ -27,16 +27,16 @@ diff -ur libffi-3.4.7 2/generate-darwin-source-and-headers.py libffi-3.4.7/gener
2727 arch = 'arm64_32'
2828 version_min = '-mwatchos-version-min=4.0'
2929+
30- + class xros_simulator_arm64_platform (arm64_platform):
31- + target = 'arm64-apple-xros -simulator'
32- + directory = 'darwin_xros '
30+ + class visionos_simulator_arm64_platform (arm64_platform):
31+ + target = 'arm64-apple-visionos -simulator'
32+ + directory = 'darwin_visionos '
3333+ sdk = 'xrsimulator'
3434+ version_min = ''
3535
3636
37- + class xros_device_arm64_platform (arm64_platform):
38- + target = 'arm64-apple-xros '
39- + directory = 'darwin_xros '
37+ + class visionos_device_arm64_platform (arm64_platform):
38+ + target = 'arm64-apple-visionos '
39+ + directory = 'darwin_visionos '
4040+ sdk = 'xros'
4141+ arch = 'arm64'
4242+ version_min = ''
@@ -49,46 +49,46 @@ diff -ur libffi-3.4.7 2/generate-darwin-source-and-headers.py libffi-3.4.7/gener
4949 generate_ios=True,
5050 generate_tvos=True,
5151 generate_watchos=True,
52- + generate_xros =True
52+ + generate_visionos =True
5353 ):
5454 copy_files('src', 'darwin_common/src', pattern='*.c')
5555 copy_files('include', 'darwin_common/include', pattern='*.h')
5656@@ -266,6 +281,9 @@
5757 copy_src_platform_files(watchos_simulator_arm64_platform)
5858 copy_src_platform_files(watchos_device_armv7k_platform)
5959 copy_src_platform_files(watchos_device_arm64_32_platform)
60- + if generate_xros :
61- + copy_src_platform_files(xros_simulator_arm64_platform )
62- + copy_src_platform_files(xros_device_arm64_platform )
60+ + if generate_visionos :
61+ + copy_src_platform_files(visionos_simulator_arm64_platform )
62+ + copy_src_platform_files(visionos_device_arm64_platform )
6363
6464 platform_headers = collections.defaultdict(set)
6565
6666@@ -288,6 +306,9 @@
6767 build_target(watchos_simulator_arm64_platform, platform_headers)
6868 build_target(watchos_device_armv7k_platform, platform_headers)
6969 build_target(watchos_device_arm64_32_platform, platform_headers)
70- + if generate_xros :
71- + build_target(xros_simulator_arm64_platform , platform_headers)
72- + build_target(xros_device_arm64_platform , platform_headers)
70+ + if generate_visionos :
71+ + build_target(visionos_simulator_arm64_platform , platform_headers)
72+ + build_target(visionos_device_arm64_platform , platform_headers)
7373
7474 mkdir_p('darwin_common/include')
7575 for header_name, tag_tuples in platform_headers.items():
7676@@ -302,11 +323,13 @@
7777 parser.add_argument('--only-osx', action='store_true', default=False)
7878 parser.add_argument('--only-tvos', action='store_true', default=False)
7979 parser.add_argument('--only-watchos', action='store_true', default=False)
80- + parser.add_argument('--only-xros ', action='store_true', default=False)
80+ + parser.add_argument('--only-visionos ', action='store_true', default=False)
8181 args = parser.parse_args()
8282
8383 generate_source_and_headers(
8484- generate_osx=not args.only_ios and not args.only_tvos and not args.only_watchos,
8585- generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos,
8686- generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos,
8787- generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos,
88- + generate_osx=not args.only_ios and not args.only_tvos and not args.only_watchos and not args.only_xros ,
89- + generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos and not args.only_xros ,
90- + generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos and not args.only_xros ,
91- + generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos and not args.only_xros ,
92- + generate_xros =not args.only_ios and not args.only_osx and not args.only_tvos and not args.only_watchos,
88+ + generate_osx=not args.only_ios and not args.only_tvos and not args.only_watchos and not args.only_visionos ,
89+ + generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos and not args.only_visionos ,
90+ + generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos and not args.only_visionos ,
91+ + generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos and not args.only_visionos ,
92+ + generate_visionos =not args.only_ios and not args.only_osx and not args.only_tvos and not args.only_watchos,
9393 )
9494
0 commit comments