提交 5ded1ca6 编写于 作者: M MouriNaruto 提交者: Matt Caswell

Improve the Windows OneCore target support. (Add targets for building...

Improve the Windows OneCore target support. (Add targets for building libraries for Windows Store apps.)
Reviewed-by: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8917)
上级 b4d3f203
......@@ -9,6 +9,11 @@
Changes between 1.1.1 and 3.0.0 [xx XXX xxxx]
*) Add target VC-WIN32-UWP, VC-WIN64A-UWP, VC-WIN32-ARM-UWP and
VC-WIN64-ARM-UWP in Windows OneCore target for making building libraries
for Windows Store apps easier. Also, the "no-uplink" option has been added.
[Kenji Mouri]
*) Join the directories crypto/x509 and crypto/x509v3
[Richard Levitte]
......
......@@ -1273,7 +1273,7 @@ my %targets = (
},
"VC-WIN64I" => {
inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
sub { $disabled{shared} ? () : "ia64_uplink" } ],
sub { $disabled{uplink} ? () : "ia64_uplink" } ],
AS => "ias",
ASFLAGS => "-d debug",
asoutflag => "-o ",
......@@ -1285,7 +1285,7 @@ my %targets = (
},
"VC-WIN64A" => {
inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
sub { $disabled{shared} ? () : "x86_64_uplink" } ],
sub { $disabled{uplink} ? () : "x86_64_uplink" } ],
AS => sub { vc_win64a_info()->{AS} },
ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} },
asoutflag => sub { vc_win64a_info()->{asoutflag} },
......@@ -1298,7 +1298,7 @@ my %targets = (
},
"VC-WIN32" => {
inherit_from => [ "VC-noCE-common", asm("x86_asm"),
sub { $disabled{shared} ? () : "uplink_common" } ],
sub { $disabled{uplink} ? () : "uplink_common" } ],
CFLAGS => add("/WX"),
AS => sub { vc_win32_info()->{AS} },
ASFLAGS => sub { vc_win32_info()->{ASFLAGS} },
......@@ -1382,7 +1382,7 @@ my %targets = (
},
"mingw" => {
inherit_from => [ "mingw-common", asm("x86_asm"),
sub { $disabled{shared} ? () : "x86_uplink" } ],
sub { $disabled{uplink} ? () : "x86_uplink" } ],
CFLAGS => add(picker(release => "-fomit-frame-pointer")),
cflags => "-m32",
sys_id => "MINGW32",
......
......@@ -61,4 +61,53 @@ my %targets = (
ex_libs => "onecore.lib",
multilib => "-arm64",
},
# Universal Windows Platform (UWP) App Support
# TODO
#
# The 'disable' attribute should have 'uplink'.
# however, these are checked in some 'inherit_from', which is processed
# very early, before the 'disable' attributes are seen.
# This is a problem that needs to be resolved in Configure first.
#
# But if you want to build library with Windows 10 Version 1809 SDK or
# earlier, the 'disable' attribute should also have 'asm'.
"VC-WIN32-UWP" => {
inherit_from => [ "VC-WIN32-ONECORE" ],
lflags => add("/APPCONTAINER"),
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
"_WIN32_WINNT=0x0A00"),
dso_scheme => "",
disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
ex_libs => "WindowsApp.lib",
},
"VC-WIN64A-UWP" => {
inherit_from => [ "VC-WIN64A-ONECORE" ],
lflags => add("/APPCONTAINER"),
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
"_WIN32_WINNT=0x0A00"),
dso_scheme => "",
disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
ex_libs => "WindowsApp.lib",
},
"VC-WIN32-ARM-UWP" => {
inherit_from => [ "VC-WIN32-ARM" ],
lflags => add("/APPCONTAINER"),
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
"_WIN32_WINNT=0x0A00"),
dso_scheme => "",
disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
ex_libs => "WindowsApp.lib",
},
"VC-WIN64-ARM-UWP" => {
inherit_from => [ "VC-WIN64-ARM" ],
lflags => add("/APPCONTAINER"),
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
"_WIN32_WINNT=0x0A00"),
dso_scheme => "",
disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
ex_libs => "WindowsApp.lib",
},
);
......@@ -64,6 +64,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lx
# zlib-dynamic Like "zlib", but the zlib library is expected to be a shared
# library and will be loaded in run-time by the OpenSSL library.
# sctp include SCTP support
# no-uplink Don't build support for UPLINK interface.
# enable-weak-ssl-ciphers
# Enable weak ciphers that are disabled by default.
# 386 generate 80386 code in assembly modules
......@@ -412,6 +413,7 @@ my @disablables = (
"ubsan",
"ui-console",
"unit-test",
"uplink",
"whirlpool",
"weak-ssl-ciphers",
"zlib",
......@@ -504,7 +506,7 @@ my @disable_cascades = (
# which cannot be guaranteed if shared libraries aren't present.
# (note that even with shared libraries, both the app and dynamic engines
# must be linked with the same library)
"shared" => [ "dynamic-engine" ],
"shared" => [ "dynamic-engine", "uplink" ],
# Other modules don't necessarily have to link with libcrypto, so shared
# libraries do not have to be a condition to produce those.
......
......@@ -558,6 +558,9 @@
Enable additional unit test APIs. This should not typically
be used in production deployments.
no-uplink
Don't build support for UPLINK interface.
enable-weak-ssl-ciphers
Build support for SSL/TLS ciphers that are considered "weak"
(e.g. RC4 based ciphersuites).
......
......@@ -83,6 +83,18 @@
is, of course, to choose a different set of directories by using
--prefix and --openssldir when configuring.
Special notes for Universal Windows Platform builds, a.k.a. VC-*-UWP
--------------------------------------------------------------------
- UWP targets only support building the static and dynamic libraries.
- The "no-uplink" must be given in the "Configure" script.
- You should define the platform type to "uwp" and the target arch via
"vcvarsall.bat" before you compile. For example, if you want to build
"arm64" builds, you should type "vcvarsall.bat x86_arm64 uwp".
mingw and mingw64
=================
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册