50-win-onecore.conf 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. 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. );