+## -*- mode: perl; -*-
# Windows OneCore targets.
#
# OneCore is new API stability "contract" that transcends Desktop, IoT and
# TODO: extend error handling to use ETW based eventing
# (Or rework whole error messaging)
+my $UWP_info = {};
+sub UWP_info {
+ unless (%$UWP_info) {
+ my $SDKver = `powershell -Command \"& {\$(Get-Item \\\"hklm:\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\\").GetValue(\\\"CurrentVersion\\\")}\"`;
+ $SDKver =~ s|\R$||;
+ my @SDKver_split = split(/\./, $SDKver);
+ # SDK version older than 10.0.17763 don't support our ASM builds
+ if ($SDKver_split[0] < 10
+ || ($SDKver_split[0] == 10
+ && $SDKver_split[1] == 0
+ && $SDKver_split[2] < 17763)) {
+ $UWP_info->{disable} = [ 'asm' ];
+ } else {
+ $UWP_info->{disable} = [ ];
+ }
+ }
+ return $UWP_info;
+}
+
my %targets = (
"VC-WIN32-ONECORE" => {
inherit_from => [ "VC-WIN32" ],
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
"_WIN32_WINNT=0x0A00"),
dso_scheme => "",
- disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
+ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',
+ @{ UWP_info()->{disable} } ] },
ex_libs => "WindowsApp.lib",
},
"VC-WIN64A-UWP" => {
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
"_WIN32_WINNT=0x0A00"),
dso_scheme => "",
- disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
+ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',
+ @{ UWP_info()->{disable} } ] },
ex_libs => "WindowsApp.lib",
},
"VC-WIN32-ARM-UWP" => {
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
"_WIN32_WINNT=0x0A00"),
dso_scheme => "",
- disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
+ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',
+ @{ UWP_info()->{disable} } ] },
ex_libs => "WindowsApp.lib",
},
"VC-WIN64-ARM-UWP" => {
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
"_WIN32_WINNT=0x0A00"),
dso_scheme => "",
- disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
+ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',
+ @{ UWP_info()->{disable} } ] },
ex_libs => "WindowsApp.lib",
},
);