Skip to content

Added support for building for VisionOS #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
298 changes: 298 additions & 0 deletions 20-apple.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
my %targets = ();

%targets = (
## Base settings for iOS
"ios-cross-base" => {
template => 1,
cflags => combine('-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common', sub { defined($ENV{'IPHONEOS_DEPLOYMENT_VERSION'}) ? '-mios-version-min=$(IPHONEOS_DEPLOYMENT_VERSION)' : '-mios-version-min=9.0'; }),
disable => [ "engine", "async" ]
},

## Base settings for iOS Simulator
"ios-sim-cross-base" => {
inherit_from => [ "ios-cross-base" ],
template => 1,
cflags => add( sub { defined($ENV{'IPHONEOS_DEPLOYMENT_VERSION'}) ? '-mios-simulator-version-min=$(IPHONEOS_DEPLOYMENT_VERSION)' : '-mios-simulator-version-min=9.0'; }),
},

## Base settings for tvOS
"tvos-cross-base" => {
template => 1,
cflags => combine('-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common', sub { defined($ENV{'APPLETVOS_DEPLOYMENT_VERSION'}) ? '-mtvos-version-min=$(APPLETVOS_DEPLOYMENT_VERSION)' : '-mtvos-version-min=9.0'; }),
disable => [ "engine", "async" ],
defines => [ "HAVE_FORK=0" ]
},

## Base settings for tvOS Simulator
"tvos-sim-cross-base" => {
inherit_from => [ "tvos-cross-base" ],
template => 1,
cflags => add( sub { defined($ENV{'APPLETVOS_DEPLOYMENT_VERSION'}) ? '-mtvos-simulator-version-min=$(APPLETVOS_DEPLOYMENT_VERSION)' : '-mtvos-simulator-version-min=9.0'; }),
},

## Base settings for XROS
"xros-cross-base" => {
template => 1,
# cflags => '-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common',
cflags => combine('-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common', sub { defined($ENV{'XROS_DEPLOYMENT_VERSION'}) ? '-mtargetos=xros$(XROS_DEPLOYMENT_VERSION)' : '-mtargetos=xros1.0'; }),
disable => [ "engine", "async" ]
},

## Base settings for XROS Simulator
"xros-sim-cross-base" => {
inherit_from => [ "xros-cross-base" ],
template => 1,
cflags => add( sub { defined($ENV{'XROS_DEPLOYMENT_VERSION'}) ? '-mtargetos=xros$(XROS_DEPLOYMENT_VERSION)-simulator' : '-mtargetos=xros1.0-simulator'; }),
},

## Catalyst
"mac-catalyst-cross-base" => {
template => 1,
cflags => combine('-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common -mios-version-min=10.15'),
},

"mac-catalyst-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc", "mac-catalyst-cross-base" ],
cflags => add("-target x86_64-apple-ios14.0-macabi"),
disable => [ "engine", "async" ],
sys_id => "MacOSX",
},

"mac-catalyst-arm64" => {
inherit_from => [ "darwin-common", "mac-catalyst-cross-base" ],
cflags => add("-arch arm64"),
cflags => add("-target arm64-apple-ios14.0-macabi"),
lib_cppflags => add("-DL_ENDIAN"),
asm_arch => 'aarch64',
perlasm_scheme => "ios64",
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
sys_id => "MacOSX",
disable => [ "engine", "async" ],
},

## macOS
"macos-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc" ],
cflags => add('-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK)'),
disable => [ "engine", "async" ],
sys_id => "MacOSX",
},

"macos-arm64e" => {
inherit_from => [ "darwin-common" ],
CFLAGS => add("-Wall"),
cflags => add('-arch arm64e -isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK)'),
lib_cppflags => add("-DL_ENDIAN"),
asm_arch => 'aarch64',
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
disable => [ "engine", "async" ],
sys_id => "MacOSX",
},

"macos-arm64" => {
inherit_from => [ "darwin-common" ],
CFLAGS => add("-Wall"),
cflags => add('-arch arm64 -isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK)'),
lib_cppflags => add("-DL_ENDIAN"),
asm_arch => 'aarch64',
perlasm_scheme => "ios64",
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
disable => [ "engine", "async" ],
sys_id => "MacOSX",
},

## Apple iOS simulator
"ios-sim-cross-x86_64" => {
inherit_from => [ "darwin-common", "ios-sim-cross-base" ],
CC => "xcrun -sdk iphonesimulator cc",
cflags => add('-arch x86_64'),
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG",
sys_id => "iOS",
perlasm_scheme => "ios64",
},

"ios-sim-cross-i386" => {
inherit_from => [ "darwin-common", "ios-sim-cross-base" ],
CC => "xcrun -sdk iphonesimulator cc",
cflags => add('-arch i386'),
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "BN_LLONG RC4_INT",
asm_arch => 'x86',
sys_id => "iOS",
},

"ios-sim-cross-arm64e" => {
inherit_from => [ "darwin-common", "ios-sim-cross-base" ],
CC => "xcrun -sdk iphonesimulator cc",
cflags => add('-arch arm64e'),
asm_arch => 'aarch64',
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "ios64",
sys_id => "iOS",
},

"ios-sim-cross-arm64" => {
inherit_from => [ "darwin-common", "ios-sim-cross-base" ],
CC => "xcrun -sdk iphonesimulator cc",
cflags => add('-arch arm64'),
asm_arch => 'aarch64',
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "ios64",
sys_id => "iOS",
},

## Apple iOS
"ios-cross-arm64" => {
inherit_from => [ "darwin-common", "ios-cross-base" ],
cflags => add("-arch arm64"),
asm_arch => 'aarch64',
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
lib_cppflags => add("-DL_ENDIAN"),
perlasm_scheme => "ios64",
sys_id => "iOS",
},

"ios-cross-arm64e" => {
inherit_from => [ "darwin-common", "ios-cross-base" ],
cflags => add("-arch arm64e"),
asm_arch => 'aarch64',
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "ios64",
sys_id => "iOS",
},

"ios-cross-armv7s" => {
inherit_from => [ "darwin-common", "ios-cross-base" ],
cflags => add("-arch armv7s"),
asm_arch => 'armv4',
perlasm_scheme => "ios32",
sys_id => "iOS",
},

"ios-cross-armv7" => {
inherit_from => [ "darwin-common", "ios-cross-base" ],
cflags => add("-arch armv7"),
asm_arch => 'armv4',
perlasm_scheme => "ios32",
sys_id => "iOS",
},

## Apple tvOS simulator
"tvos-sim-cross-x86_64" => {
inherit_from => [ "darwin-common", "tvos-sim-cross-base" ],
CC => "xcrun -sdk appletvsimulator cc",
cflags => add('-arch x86_64'),
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG",
sys_id => "tvOS",
perlasm_scheme => "tvos64",
},

"tvos-sim-cross-i386" => {
inherit_from => [ "darwin-common", "tvos-sim-cross-base" ],
CC => "xcrun -sdk appletvsimulator cc",
cflags => add('-arch i386'),
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "BN_LLONG RC4_INT",
asm_arch => 'x86',
sys_id => "tvOS",
},

"tvos-sim-cross-arm64e" => {
inherit_from => [ "darwin-common", "tvos-sim-cross-base" ],
CC => "xcrun -sdk appletvsimulator cc",
cflags => add('-arch arm64e'),
asm_arch => 'aarch64',
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "tvos64",
sys_id => "tvOS",
},

"tvos-sim-cross-arm64" => {
inherit_from => [ "darwin-common", "tvos-sim-cross-base" ],
CC => "xcrun -sdk appletvsimulator cc",
cflags => add('-arch arm64'),
asm_arch => 'aarch64',
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "tvos64",
sys_id => "tvOS",
},

## Apple tvOS
"tvos-cross-arm64" => {
inherit_from => [ "darwin-common", "tvos-cross-base" ],
cflags => add("-arch arm64"),
asm_arch => 'aarch64',
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
lib_cppflags => add("-DL_ENDIAN"),
perlasm_scheme => "tvos64",
sys_id => "tvOS",
},

"tvos-cross-arm64e" => {
inherit_from => [ "darwin-common", "tvos-cross-base" ],
cflags => add("-arch arm64e"),
asm_arch => 'aarch64',
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "tvos64",
sys_id => "tvOS",
},

## Apple XROS simulator
"xros-sim-cross-x86_64" => {
inherit_from => [ "darwin-common", "xros-sim-cross-base" ],
CC => "xcrun -sdk xrsimulator cc",
cflags => add('-arch x86_64'),
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG",
sys_id => "XROS",
perlasm_scheme => "xros64",
},

"xros-sim-cross-arm64e" => {
inherit_from => [ "darwin-common", "xros-sim-cross-base" ],
CC => "xcrun -sdk xrsimulator cc",
cflags => add('-arch arm64e'),
asm_arch => 'aarch64',
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "xros64",
sys_id => "XROS",
},

"xros-sim-cross-arm64" => {
inherit_from => [ "darwin-common", "xros-sim-cross-base" ],
CC => "xcrun -sdk xrsimulator cc",
cflags => add('-arch arm64'),
asm_arch => 'aarch64',
lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "ios64",
sys_id => "XROS",
},

## Apple XROS
"xros-cross-arm64" => {
inherit_from => [ "darwin-common", "xros-cross-base" ],
cflags => add("-arch arm64"),
asm_arch => 'aarch64',
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
lib_cppflags => add("-DL_ENDIAN"),
perlasm_scheme => "ios64",
sys_id => "XROS",
},

"xros-cross-arm64e" => {
inherit_from => [ "darwin-common", "xros-cross-base" ],
cflags => add("-arch arm64e"),
asm_arch => 'aarch64',
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "xros64",
sys_id => "XROS",
},
);
42 changes: 42 additions & 0 deletions Clibgit2.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>libgit2_all.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
Expand All @@ -22,6 +24,8 @@
<string>maccatalyst</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>libgit2_all.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
Expand All @@ -36,6 +40,42 @@
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>libgit2_all.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>xros-arm64</string>
<key>LibraryPath</key>
<string>libgit2_all.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>xros</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>libgit2_all.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>xros-arm64-simulator</string>
<key>LibraryPath</key>
<string>libgit2_all.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>xros</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>libgit2_all.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
Expand All @@ -52,6 +92,8 @@
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>libgit2_all.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
Expand Down
Loading