# driver .so files often depend upon the bus drivers for their connect bus,
# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
# to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
- get_option('libdir'),
- pmd_subdir_opt)
+if not is_windows
+ meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+ get_option('libdir'),
+ pmd_subdir_opt)
+endif
# set the machine type and cflags for it
if meson.is_cross_build()
# check for libraries used in multiple places in DPDK
has_libnuma = 0
-numa_dep = cc.find_library('numa', required: false)
-if numa_dep.found() and cc.has_header('numaif.h')
- dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
- has_libnuma = 1
- add_project_link_arguments('-lnuma', language: 'c')
- dpdk_extra_ldflags += '-lnuma'
+find_libnuma = true
+if meson.is_cross_build() and not meson.get_cross_property('numa', true)
+ # don't look for libnuma if explicitly disabled in cross build
+ find_libnuma = false
+endif
+if find_libnuma
+ numa_dep = cc.find_library('numa', required: false)
+ if numa_dep.found() and cc.has_header('numaif.h')
+ dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
+ has_libnuma = 1
+ add_project_link_arguments('-lnuma', language: 'c')
+ dpdk_extra_ldflags += '-lnuma'
+ endif
endif
has_libfdt = 0
endif
# check for libbsd
-libbsd = dependency('libbsd', required: false)
+libbsd = dependency('libbsd', required: false, method: 'pkg-config')
if libbsd.found()
dpdk_conf.set('RTE_USE_LIBBSD', 1)
endif
# additional warnings in alphabetical order
'-Wcast-qual',
'-Wdeprecated',
+ '-Wformat',
'-Wformat-nonliteral',
'-Wformat-security',
'-Wmissing-declarations',
warning_flags += '-Wno-pointer-to-int-cast'
endif
if cc.get_id() == 'intel'
- warning_ids = [188, 2203, 2279, 2557, 3179, 3656]
+ warning_ids = [181, 188, 2203, 2279, 2557, 3179, 3656]
foreach i:warning_ids
warning_flags += '-diag-disable=@0@'.format(i)
endforeach
subdir(arch_subdir)
dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
+# apply cross-specific options
+if meson.is_cross_build()
+ # configure RTE_MAX_LCORE and RTE_MAX_NUMA_NODES from cross file
+ cross_max_lcores = meson.get_cross_property('max_lcores', 0)
+ if cross_max_lcores != 0
+ message('Setting RTE_MAX_LCORE from cross file')
+ dpdk_conf.set('RTE_MAX_LCORE', cross_max_lcores)
+ endif
+ cross_max_numa_nodes = meson.get_cross_property('max_numa_nodes', 0)
+ if cross_max_numa_nodes != 0
+ message('Setting RTE_MAX_NUMA_NODES from cross file')
+ dpdk_conf.set('RTE_MAX_NUMA_NODES', cross_max_numa_nodes)
+ endif
+endif
+
# set the install path for the drivers
dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path)
-install_headers(['rte_config.h', 'rte_compatibility_defines.h'],
+install_headers(['rte_config.h'],
subdir: get_option('include_subdir_arch'))
# enable VFIO only if it is linux OS
add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
endif
+ # Disable secure CRT deprecated warnings for clang
+ if cc.get_id() == 'clang'
+ add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c')
+ endif
+
add_project_link_arguments('-lws2_32', language: 'c')
# Contrary to docs, VirtualAlloc2() is exported by mincore.lib
add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
endif
endif
+
+if get_option('default_library') == 'both'
+ error( '''
+ Unsupported value "both" for "default_library" option.
+
+ NOTE: DPDK always builds both shared and static libraries. Please set
+ "default_library" to either "static" or "shared" to select default linkage
+ for apps and any examples.''')
+endif