default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
default_ldflags = []
-if get_option('default_library') == 'static'
+if get_option('default_library') == 'static' and not is_windows
default_ldflags += ['-Wl,--export-dynamic']
endif
libraries: ['-Wl,--as-needed'] + dpdk_libraries,
libraries_private: dpdk_extra_ldflags)
+platform_flags = []
+if not is_windows
+ platform_flags += ['-Wl,--export-dynamic'] # ELF only
+endif
pkg.generate(name: 'DPDK', # main DPDK pkgconfig file
filebase: 'libdpdk',
version: meson.project_version(),
# if libbsd is not enabled, then this is blank
libraries_private: ['-Wl,--whole-archive'] +
dpdk_drivers + dpdk_static_libraries +
- ['-Wl,--no-whole-archive', '-Wl,--export-dynamic']
+ ['-Wl,--no-whole-archive'] + platform_flags
)
# For static linking with dependencies as shared libraries,
default_cflags += '-Wno-format-truncation'
endif
default_ldflags = dpdk_extra_ldflags
-if get_option('default_library') == 'static'
+if get_option('default_library') == 'static' and not is_windows
default_ldflags += ['-Wl,--export-dynamic']
endif