50-win-onecore.conf 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Windows OneCore targets.
  2. #
  3. # OneCore is new API stability "contract" that transends 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 temporarly 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. my %targets = (
  13. "VC-WIN32-ONECORE" => {
  14. inherit_from => [ "VC-WIN32" ],
  15. # /NODEFAULTLIB:kernel32.lib is needed, because MSVCRT.LIB has
  16. # hidden reference to kernel32.lib, but we don't actually want
  17. # it in "onecore" build.
  18. lflags => add("/NODEFAULTLIB:kernel32.lib"),
  19. defines => add("OPENSSL_SYS_WIN_CORE"),
  20. ex_libs => "onecore.lib",
  21. },
  22. "VC-WIN64A-ONECORE" => {
  23. inherit_from => [ "VC-WIN64A" ],
  24. lflags => add("/NODEFAULTLIB:kernel32.lib"),
  25. defines => add("OPENSSL_SYS_WIN_CORE"),
  26. ex_libs => "onecore.lib",
  27. },
  28. # Windows on ARM targets. ARM compilers are additional components in
  29. # VS2017, i.e. they are not installed by default. And when installed,
  30. # there are no "ARM Tool Command Prompt"s on Start menu, you have
  31. # to locate vcvarsall.bat and act accordingly. VC-WIN32-ARM has
  32. # received limited testing with evp_test.exe on Windows 10 IoT Core,
  33. # but not VC-WIN64-ARM, no hardware... In other words they are not
  34. # actually supported...
  35. #
  36. # Another thing to keep in mind [in cross-compilation scenario such
  37. # as this one] is that target's file system has nothing to do with
  38. # compilation system's one. This means that you're are likely to use
  39. # --prefix and --openssldir with target-specific values. 'nmake install'
  40. # step is effectively meaningless in cross-compilation case, though
  41. # it might be useful to 'nmake install DESTDIR=S:\ome\where' where you
  42. # can point Visual Studio to when compiling custom application code.
  43. "VC-WIN32-ARM" => {
  44. inherit_from => [ "VC-noCE-common" ],
  45. defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE",
  46. "OPENSSL_SYS_WIN_CORE"),
  47. bn_ops => "BN_LLONG RC4_CHAR EXPORT_VAR_AS_FN",
  48. lflags => add("/NODEFAULTLIB:kernel32.lib"),
  49. ex_libs => "onecore.lib",
  50. multilib => "-arm",
  51. },
  52. "VC-WIN64-ARM" => {
  53. inherit_from => [ "VC-noCE-common" ],
  54. defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE",
  55. "OPENSSL_SYS_WIN_CORE"),
  56. bn_ops => "SIXTY_FOUR_BIT RC4_CHAR EXPORT_VAR_AS_FN",
  57. lflags => add("/NODEFAULTLIB:kernel32.lib"),
  58. ex_libs => "onecore.lib",
  59. multilib => "-arm64",
  60. },
  61. # Universal Windows Platform (UWP) App Support
  62. # TODO
  63. #
  64. # The 'disable' attribute should have 'uplink'.
  65. # however, these are checked in some 'inherit_from', which is processed
  66. # very early, before the 'disable' attributes are seen.
  67. # This is a problem that needs to be resolved in Configure first.
  68. #
  69. # But if you want to build library with Windows 10 Version 1809 SDK or
  70. # earlier, the 'disable' attribute should also have 'asm'.
  71. "VC-WIN32-UWP" => {
  72. inherit_from => [ "VC-WIN32-ONECORE" ],
  73. lflags => add("/APPCONTAINER"),
  74. defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
  75. "_WIN32_WINNT=0x0A00"),
  76. dso_scheme => "",
  77. disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
  78. ex_libs => "WindowsApp.lib",
  79. },
  80. "VC-WIN64A-UWP" => {
  81. inherit_from => [ "VC-WIN64A-ONECORE" ],
  82. lflags => add("/APPCONTAINER"),
  83. defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
  84. "_WIN32_WINNT=0x0A00"),
  85. dso_scheme => "",
  86. disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
  87. ex_libs => "WindowsApp.lib",
  88. },
  89. "VC-WIN32-ARM-UWP" => {
  90. inherit_from => [ "VC-WIN32-ARM" ],
  91. lflags => add("/APPCONTAINER"),
  92. defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
  93. "_WIN32_WINNT=0x0A00"),
  94. dso_scheme => "",
  95. disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
  96. ex_libs => "WindowsApp.lib",
  97. },
  98. "VC-WIN64-ARM-UWP" => {
  99. inherit_from => [ "VC-WIN64-ARM" ],
  100. lflags => add("/APPCONTAINER"),
  101. defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
  102. "_WIN32_WINNT=0x0A00"),
  103. dso_scheme => "",
  104. disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
  105. ex_libs => "WindowsApp.lib",
  106. },
  107. );