[0/3] RFC fix import/export MSVC data variables

Message ID 1710229908-31704-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
Headers
Series RFC fix import/export MSVC data variables |

Message

Tyler Retzlaff March 12, 2024, 7:51 a.m. UTC
  MSVC requires that data variables within DPDK to be explicitly exported
and when consumed by applications be explicitly imported. Further, MSVC
and the Microsoft Linker need additional information when exporting
data variables that are thread local storage that cannot be conveyed
through the version.map -> exports.def generation. The generation
script has been updated to allow data exports to be excluded during
a build with MSVC where the intent is to export them via the macros.

This RFC series proposes per-library macro that can be used to mark the
data variables for export so that when processed appropriate declaration
of import or export is achieved either within the dpdk build or by a
consuming application.

I have only supplied an example series that uses the macro on a handful
of variables to demonstrate their use, after feedback on the RFC all
libs will have whatever method is arrived at applied to exported data
variables.

Thanks!

Tyler Retzlaff (3):
  buildtools: ignore exports for MSVC
  eal: import and export data variables for MSVC
  ethdev: import and export data variables for MSVC

 buildtools/map_to_win.py         | 13 +++++++++----
 lib/eal/include/meson.build      |  1 +
 lib/eal/include/rte_common.h     |  8 ++++++++
 lib/eal/include/rte_eal.h        |  2 ++
 lib/eal/include/rte_eal_export.h | 23 +++++++++++++++++++++++
 lib/eal/include/rte_errno.h      |  2 ++
 lib/eal/version.map              |  6 +++---
 lib/ethdev/meson.build           |  1 +
 lib/ethdev/rte_ethdev_core.h     |  3 +++
 lib/ethdev/rte_ethdev_export.h   | 23 +++++++++++++++++++++++
 lib/ethdev/version.map           |  2 +-
 lib/meson.build                  |  6 ++++--
 12 files changed, 80 insertions(+), 10 deletions(-)
 create mode 100644 lib/eal/include/rte_eal_export.h
 create mode 100644 lib/ethdev/rte_ethdev_export.h