Path: blob/main/crypto/openssl/Configurations/50-win-onecore.conf
34860 views
## -*- mode: perl; -*-1# Windows OneCore targets.2#3# OneCore is new API stability "contract" that transcends Desktop, IoT and4# Mobile[?] Windows editions. It's a set up "umbrella" libraries that5# export subset of Win32 API that are common to all Windows 10 devices.6#7# OneCore Configuration temporarily dedicated for console applications8# due to disabled event logging, which is incompatible with one core.9# Error messages are provided via standard error only.10# TODO: extend error handling to use ETW based eventing11# (Or rework whole error messaging)1213my $UWP_info = {};14sub UWP_info {15unless (%$UWP_info) {16my $SDKver = `powershell -Command \"& {\$(Get-Item \\\"hklm:\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\\").GetValue(\\\"CurrentVersion\\\")}\"`;17$SDKver =~ s|\R$||;18my @SDKver_split = split(/\./, $SDKver);19# SDK version older than 10.0.17763 don't support our ASM builds20if ($SDKver_split[0] < 1021|| ($SDKver_split[0] == 1022&& $SDKver_split[1] == 023&& $SDKver_split[2] < 17763)) {24$UWP_info->{disable} = [ 'asm' ];25} else {26$UWP_info->{disable} = [ ];27}28}29return $UWP_info;30}3132my %targets = (33"VC-WIN32-ONECORE" => {34inherit_from => [ "VC-WIN32" ],35# /NODEFAULTLIB:kernel32.lib is needed, because MSVCRT.LIB has36# hidden reference to kernel32.lib, but we don't actually want37# it in "onecore" build.38lflags => add("/NODEFAULTLIB:kernel32.lib"),39defines => add("OPENSSL_SYS_WIN_CORE"),40ex_libs => "onecore.lib",41},42"VC-WIN64A-ONECORE" => {43inherit_from => [ "VC-WIN64A" ],44lflags => add("/NODEFAULTLIB:kernel32.lib"),45defines => add("OPENSSL_SYS_WIN_CORE"),46ex_libs => "onecore.lib",47},4849# Windows on ARM targets. ARM compilers are additional components in50# VS2017, i.e. they are not installed by default. And when installed,51# there are no "ARM Tool Command Prompt"s on Start menu, you have52# to locate vcvarsall.bat and act accordingly. VC-WIN32-ARM has53# received limited testing with evp_test.exe on Windows 10 IoT Core,54# but not VC-WIN64-ARM, no hardware... In other words they are not55# actually supported...56#57# Another thing to keep in mind [in cross-compilation scenario such58# as this one] is that target's file system has nothing to do with59# compilation system's one. This means that you're are likely to use60# --prefix and --openssldir with target-specific values. 'nmake install'61# step is effectively meaningless in cross-compilation case, though62# it might be useful to 'nmake install DESTDIR=S:\ome\where' where you63# can point Visual Studio to when compiling custom application code.6465"VC-WIN32-ARM" => {66inherit_from => [ "VC-noCE-common" ],67defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE",68"OPENSSL_SYS_WIN_CORE"),69bn_ops => "BN_LLONG RC4_CHAR",70lflags => add("/NODEFAULTLIB:kernel32.lib"),71ex_libs => "onecore.lib",72multilib => "-arm",73},74"VC-WIN64-ARM" => {75inherit_from => [ "VC-noCE-common" ],76defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE",77"OPENSSL_SYS_WIN_CORE"),78bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",79lflags => add("/NODEFAULTLIB:kernel32.lib"),80ex_libs => "onecore.lib",81multilib => "-arm64",82},8384# Universal Windows Platform (UWP) App Support8586# TODO87#88# The 'disable' attribute should have 'uplink'.89# however, these are checked in some 'inherit_from', which is processed90# very early, before the 'disable' attributes are seen.91# This is a problem that needs to be resolved in Configure first.92#93# But if you want to build library with Windows 10 Version 1809 SDK or94# earlier, the 'disable' attribute should also have 'asm'.9596"VC-WIN32-UWP" => {97inherit_from => [ "VC-WIN32-ONECORE" ],98lflags => add("/APPCONTAINER"),99defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",100"_WIN32_WINNT=0x0A00"),101dso_scheme => "",102disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',103@{ UWP_info()->{disable} } ] },104ex_libs => "WindowsApp.lib",105},106"VC-WIN64A-UWP" => {107inherit_from => [ "VC-WIN64A-ONECORE" ],108lflags => add("/APPCONTAINER"),109defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",110"_WIN32_WINNT=0x0A00"),111dso_scheme => "",112disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',113@{ UWP_info()->{disable} } ] },114ex_libs => "WindowsApp.lib",115},116"VC-WIN32-ARM-UWP" => {117inherit_from => [ "VC-WIN32-ARM" ],118lflags => add("/APPCONTAINER"),119defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",120"_WIN32_WINNT=0x0A00"),121dso_scheme => "",122disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',123@{ UWP_info()->{disable} } ] },124ex_libs => "WindowsApp.lib",125},126"VC-WIN64-ARM-UWP" => {127inherit_from => [ "VC-WIN64-ARM" ],128lflags => add("/APPCONTAINER"),129defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",130"_WIN32_WINNT=0x0A00"),131dso_scheme => "",132disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',133@{ UWP_info()->{disable} } ] },134ex_libs => "WindowsApp.lib",135},136);137138139