• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Windows OneCore targets.
2#
3# OneCore is new API stability "contract" that transcends Desktop, IoT and
4# Mobile[?] Windows editions. It's a set up "umbrella" libraries that
5# export subset of Win32 API that are common to all Windows 10 devices.
6#
7# OneCore Configuration temporarily dedicated for console applications
8# 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 eventing
11# (Or rework whole error messaging)
12
13my %targets = (
14    "VC-WIN32-ONECORE" => {
15        inherit_from    => [ "VC-WIN32" ],
16        # /NODEFAULTLIB:kernel32.lib is needed, because MSVCRT.LIB has
17        # hidden reference to kernel32.lib, but we don't actually want
18        # it in "onecore" build.
19        lflags          => add("/NODEFAULTLIB:kernel32.lib"),
20        defines         => add("OPENSSL_SYS_WIN_CORE"),
21        ex_libs         => "onecore.lib",
22    },
23    "VC-WIN64A-ONECORE" => {
24        inherit_from    => [ "VC-WIN64A" ],
25        lflags          => add("/NODEFAULTLIB:kernel32.lib"),
26        defines         => add("OPENSSL_SYS_WIN_CORE"),
27        ex_libs         => "onecore.lib",
28    },
29
30    # Windows on ARM targets. ARM compilers are additional components in
31    # VS2017, i.e. they are not installed by default. And when installed,
32    # there are no "ARM Tool Command Prompt"s on Start menu, you have
33    # to locate vcvarsall.bat and act accordingly. VC-WIN32-ARM has
34    # received limited testing with evp_test.exe on Windows 10 IoT Core,
35    # but not VC-WIN64-ARM, no hardware... In other words they are not
36    # actually supported...
37    #
38    # Another thing to keep in mind [in cross-compilation scenario such
39    # as this one] is that target's file system has nothing to do with
40    # compilation system's one. This means that you're are likely to use
41    # --prefix and --openssldir with target-specific values. 'nmake install'
42    # step is effectively meaningless in cross-compilation case, though
43    # it might be useful to 'nmake install DESTDIR=S:\ome\where' where you
44    # can point Visual Studio to when compiling custom application code.
45
46    "VC-WIN32-ARM" => {
47        inherit_from    => [ "VC-noCE-common" ],
48        defines         => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE",
49                               "OPENSSL_SYS_WIN_CORE"),
50        bn_ops          => "BN_LLONG RC4_CHAR EXPORT_VAR_AS_FN",
51        lflags          => add("/NODEFAULTLIB:kernel32.lib"),
52        ex_libs         => "onecore.lib",
53        multilib        => "-arm",
54    },
55    "VC-WIN64-ARM" => {
56        inherit_from    => [ "VC-noCE-common" ],
57        defines         => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE",
58                               "OPENSSL_SYS_WIN_CORE"),
59        bn_ops          => "SIXTY_FOUR_BIT RC4_CHAR EXPORT_VAR_AS_FN",
60        lflags          => add("/NODEFAULTLIB:kernel32.lib"),
61        ex_libs         => "onecore.lib",
62        multilib        => "-arm64",
63    },
64);
65