Commit 5ded1ca6 authored by MouriNaruto's avatar MouriNaruto Committed by Matt Caswell
Browse files

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: default avatarRichard Levitte <levitte@openssl.org>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8917)
parent b4d3f203
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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]
+4 −4
Original line number Diff line number Diff line
@@ -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",
+49 −0
Original line number Diff line number Diff line
@@ -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",
    },
);
+3 −1
Original line number Diff line number Diff line
@@ -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.

+3 −0
Original line number Diff line number Diff line
@@ -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).
Loading