158 lines
6.0 KiB
Perl
158 lines
6.0 KiB
Perl
## -*- mode: perl; -*-
|
|
|
|
my %targets = ();
|
|
|
|
%targets = (
|
|
## Base settings for cross-compile
|
|
# Based on 10-main.conf: iphoneos-cross
|
|
# Add generic compiler flags
|
|
# Add embed-bitcode option if SDK version is 9 or higher
|
|
"all-base" => {
|
|
template => 1,
|
|
cflags => combine('-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common',
|
|
sub { ((!defined($ENV{'CONFIG_DISABLE_BITCODE'}) || $ENV{'CONFIG_DISABLE_BITCODE'} ne 'true') && defined($ENV{'SDKVERSION'}) && $ENV{'SDKVERSION'} =~ /^(9|[1-9][0-9]+)\./ && $disabled{shared})
|
|
? '-fembed-bitcode' : (); },
|
|
),
|
|
},
|
|
|
|
## Base settings
|
|
"ios-cross-base" => {
|
|
inherit_from => [ "all-base" ],
|
|
template => 1,
|
|
cflags => add(sub { defined($ENV{'IOS_MIN_SDK_VERSION'}) ? '-mios-version-min=$(IOS_MIN_SDK_VERSION)' : '-mios-version-min=12.0'; }),
|
|
},
|
|
"macos-base" => {
|
|
inherit_from => [ "all-base" ],
|
|
template => 1,
|
|
cflags => add(sub { defined($ENV{'MACOS_MIN_SDK_VERSION'}) ? '-mmacosx-version-min=$(MACOS_MIN_SDK_VERSION)' : '-mmacosx-version-min=10.15'; }),
|
|
},
|
|
"mac-catalyst-base" => {
|
|
inherit_from => [ "all-base" ],
|
|
template => 1,
|
|
# cflags => add(sub { defined($ENV{'CATALYST_MIN_SDK_VERSION'}) ? '-mmacosx-version-min=$(CATALYST_MIN_SDK_VERSION)' : '-mmacosx-version-min=10.15'; }),
|
|
},
|
|
"watchos-cross-base" => {
|
|
inherit_from => [ "all-base" ],
|
|
template => 1,
|
|
cflags => add(sub { defined($ENV{'WATCH_MIN_SDK_VERSION'}) ? '-mwatchos-version-min=$(WATCH_MIN_SDK_VERSION)' : '-mwatchos-version-min=4.0'; }),
|
|
},
|
|
"tvos-cross-base" => {
|
|
inherit_from => [ "all-base" ],
|
|
template => 1,
|
|
cflags => add(sub { defined($ENV{'TVOS_MIN_SDK_VERSION'}) ? '-mtvos-version-min=$(TVOS_MIN_SDK_VERSION)' : '-mtvos-version-min=12.0'; }),
|
|
defines => [ "HAVE_FORK=0" ],
|
|
},
|
|
|
|
## Apple iOS
|
|
|
|
# Device (arm64)
|
|
"ios64-cross-arm64" => {
|
|
inherit_from => [ "darwin-common", "ios-cross-base", asm("aarch64_asm") ],
|
|
cflags => add("-arch arm64"),
|
|
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
|
|
perlasm_scheme => "ios64",
|
|
sys_id => "iOS",
|
|
},
|
|
# Device (arm64e)
|
|
"ios64-cross-arm64e" => {
|
|
inherit_from => [ "darwin-common", "ios-cross-base", asm("aarch64_asm") ],
|
|
cflags => add("-arch arm64e"),
|
|
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
|
|
perlasm_scheme => "ios64",
|
|
sys_id => "iOS",
|
|
},
|
|
# Simulator (x86_64)
|
|
"ios-sim-cross-x86_64" => {
|
|
inherit_from => [ "darwin64-x86_64-cc", "ios-cross-base" ],
|
|
sys_id => "iOS",
|
|
},
|
|
# Simulator (arm64)
|
|
"ios-sim-cross-arm64" => {
|
|
inherit_from => [ "darwin64-arm64-cc", "ios-cross-base" ],
|
|
cflags => add("-target arm64-apple-ios13.0-simulator"),
|
|
sys_id => "iOS",
|
|
},
|
|
|
|
## Apple macOS
|
|
|
|
# Base (arm64)
|
|
"darwin64-arm64-cc" => {
|
|
inherit_from => [ "darwin-common", asm("aarch64_asm") ],
|
|
CFLAGS => add("-Wall"),
|
|
cflags => add("-arch arm64"),
|
|
lib_cppflags => add("-DL_ENDIAN"),
|
|
bn_ops => "SIXTY_FOUR_BIT_LONG",
|
|
perlasm_scheme => "ios64",
|
|
},
|
|
|
|
# Device (x86_64)
|
|
"macos64-x86_64" => {
|
|
inherit_from => [ "darwin64-x86_64-cc", "macos-base" ],
|
|
sys_id => "macOS",
|
|
},
|
|
# Device (arm64)
|
|
"macos64-arm64" => {
|
|
inherit_from => [ "darwin64-arm64-cc", "macos-base" ],
|
|
sys_id => "macOS",
|
|
},
|
|
# Catalyst (x86_64)
|
|
"mac-catalyst-x86_64" => {
|
|
inherit_from => [ "darwin64-x86_64-cc", "mac-catalyst-base" ],
|
|
cflags => add("-target x86_64-apple-ios13.0-macabi"),
|
|
sys_id => "MacOSX",
|
|
},
|
|
# Catalyst (arm64)
|
|
"mac-catalyst-arm64" => {
|
|
inherit_from => [ "darwin64-arm64-cc", "mac-catalyst-base" ],
|
|
cflags => add("-target arm64-apple-ios13.0-macabi "),
|
|
sys_id => "MacOSX",
|
|
},
|
|
|
|
## Apple WatchOS
|
|
|
|
# Device
|
|
"watchos-cross-armv7k" => {
|
|
inherit_from => [ "darwin-common", "watchos-cross-base", asm("armv7_asm") ],
|
|
cflags => add("-arch armv7k -fembed-bitcode"),
|
|
defines => [ "HAVE_FORK=0" ],
|
|
sys_id => "WatchOS",
|
|
},
|
|
"watchos-cross-arm64_32" => {
|
|
inherit_from => [ "darwin-common", "watchos-cross-base"],
|
|
cflags => add("-arch arm64_32 -fembed-bitcode"),
|
|
defines => [ "HAVE_FORK=0" ],
|
|
sys_id => "WatchOS",
|
|
},
|
|
"watchos-cross-arm64" => {
|
|
inherit_from => [ "darwin-common", "watchos-cross-base", asm("aarch64_asm") ],
|
|
cflags => add("-arch arm64 -fembed-bitcode"),
|
|
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
|
|
perlasm_scheme => "ios64",
|
|
defines => [ "HAVE_FORK=0" ],
|
|
sys_id => "WatchOS",
|
|
},
|
|
# Simulator
|
|
"watchos-sim-cross-x86_64" => {
|
|
inherit_from => [ "darwin64-x86_64-cc", "watchos-cross-base"],
|
|
cflags => add("-fembed-bitcode"),
|
|
defines => [ "HAVE_FORK=0" ],
|
|
sys_id => "WatchOS",
|
|
},
|
|
|
|
## Apple TV
|
|
|
|
# Device (arm64)
|
|
"tvos64-cross-arm64" => {
|
|
inherit_from => [ "darwin-common", "tvos-cross-base", asm("aarch64_asm") ],
|
|
cflags => add("-arch arm64"),
|
|
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
|
|
perlasm_scheme => "ios64",
|
|
sys_id => "tvOS",
|
|
},
|
|
# Simulator (x86_64)
|
|
"tvos-sim-cross-x86_64" => {
|
|
inherit_from => [ "darwin64-x86_64-cc", "tvos-cross-base" ],
|
|
sys_id => "tvOS",
|
|
},
|
|
);
|