Add scanning for experimental symbols to meson
Subsystems (2)
cover Add scanning for experimental symbols to meson
The meson builds were missing support for scanning experimental symbols in the .o/.a files and matching that against those tagged as experimental in the version file. This set adds that missing support.
Bruce Richardson (3):
check-experimental-syms: remove use of environmental var
lib: add experimental symbols check to meson build
drivers: process shared lib link dependencies as for libs
buildtools/check-experimental-syms.sh | 2 +- buildtools/meson.build | 2 ++ drivers/meson.build | 27 +++++++++++++++++++++++++-- lib/meson.build | 12 +++++++++++- 4 files changed, 39 insertions(+), 4 deletions(-)
Signature · 1 line
2.21.0
PATCH 1/3 check-experimental-syms: remove use of environmental var
The check-experimental-syms.sh script was finding the map-list-symbol.sh script using $RTE_SDK, which is the variable set when using the "make" build system. To make this script more independent, we just use the current path of the script as the location to find its companion script.
--- buildtools/check-experimental-syms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
buildtools/check-experimental-syms.sh +1 -1
@@ -5,7 +5,7 @@ MAPFILE=$1 OBJFILE=$2 -LIST_SYMBOL=$RTE_SDK/buildtools/map-list-symbol.sh +LIST_SYMBOL=$(dirname $(readlink -f $0))/map-list-symbol.sh # added check for "make -C test/" usage if [ ! -e $MAPFILE ] || [ ! -f $OBJFILE ]
Signature · 1 line
2.21.0
PATCH 2/3 lib: add experimental symbols check to meson build
In reply to Bruce RichardsonCall check-experimental-syms.sh script as part of the meson build to ensure that all functions are correctly tagged.
--- buildtools/meson.build | 2 ++ lib/meson.build | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-)
buildtools/meson.build +2 -0
@@ -5,6 +5,8 @@ subdir('pmdinfogen') pmdinfo = find_program('gen-pmdinfo-cfile.sh') +check_experimental_syms = find_program('check-experimental-syms.sh') + # set up map-to-def script using python, either built-in or external python3 = import('python').find_installation(required: false) if python3.found()
lib/meson.build +11 -1
@@ -128,11 +128,21 @@ foreach l:libraries command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'], input: version_map, output: 'rte_@0@_exports.def'.format(name)) + lk_deps = [version_map, def_file] if is_windows lk_args = ['-Wl,/def:' + def_file.full_path(), '-Wl,/implib:lib\\' + implib] else lk_args = ['-Wl,--version-script=' + version_map] + # on unix systems check the output of the + # experimental syms script, using it as a + # dependency of the .so build + lk_deps += custom_target(name + '.exp_chk', + command: [check_experimental_syms, + version_map, '@INPUT@'], + capture: true, + input: static_lib, + output: name + '.exp_chk') endif shared_lib = shared_library(libname,
@@ -142,7 +152,7 @@ foreach l:libraries dependencies: shared_deps, include_directories: includes, link_args: lk_args, - link_depends: [version_map, def_file], + link_depends: lk_deps, version: lib_version, soversion: so_version, install: true)
Signature · 1 line
2.21.0
PATCH 3/3 drivers: process shared lib link dependencies as for libs
In reply to Bruce RichardsonFor the public APIs of DPDK libraries we run checks for correct use of experimental tags, and also do dynamic generation of the version file to its window's equivalent. Although must drivers don't export APIs, some do, so these checks are relevant and should be copied from lib/meson.build to drivers/meson.build.
--- drivers/meson.build | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
drivers/meson.build +25 -2
@@ -131,14 +131,37 @@ foreach class:dpdk_driver_classes version_map = '@0@/@1@/@2@_version.map'.format( meson.current_source_dir(), drv_path, lib_name) + implib = dir_name + '.dll.a' + + def_file = custom_target(lib_name + '_def', + command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'], + input: version_map, + output: '@0@_exports.def'.format(lib_name)) + lk_deps = [version_map, def_file] + if is_windows + lk_args = ['-Wl,/def:' + def_file.full_path(), + '-Wl,/implib:lib\\' + implib] + else + lk_args = ['-Wl,--version-script=' + version_map] + # on unix systems check the output of the + # experimental syms script, using it as a + # dependency of the .so build + lk_deps += custom_target(lib_name + '.exp_chk', + command: [check_experimental_syms, + version_map, '@INPUT@'], + capture: true, + input: static_lib, + output: lib_name + '.exp_chk') + endif + shared_lib = shared_library(lib_name, sources, objects: objs, include_directories: includes, dependencies: shared_objs, c_args: cflags, - link_args: '-Wl,--version-script=' + version_map, - link_depends: version_map, + link_args: lk_args, + link_depends: lk_deps, version: lib_version, soversion: so_version, install: true,
Signature · 1 line
2.21.0
Quoted 10 lines · Bruce Richardson
The meson builds were missing support for scanning experimental symbols
in the .o/.a files and matching that against those tagged as experimental in the version file. This set adds that missing support.Bruce Richardson (3):
check-experimental-syms: remove use of environmental var
lib: add experimental symbols check to meson build
drivers: process shared lib link dependencies as for libs
Quoted 6 lines
buildtools/check-experimental-syms.sh | 2 +- buildtools/meson.build | 2 ++ drivers/meson.build | 27 +++++++++++++++++++++++++-- lib/meson.build | 12 +++++++++++- 4 files changed, 39 insertions(+), 4 deletions(-)
Signature · 2 lines
Kind regards, Luca Boccassi
Thomas Monjalon
Applied09/10/2019 10:17, Luca Boccassi:
Quoted 6 lines · Bruce Richardson
Quoted 5 lines
The meson builds were missing support for scanning experimental symbols
in the .o/.a files and matching that against those tagged as experimental in the version file. This set adds that missing support.
Quoted 7 lines
Quoted 5 lines
Bruce Richardson (3):
check-experimental-syms: remove use of environmental var
lib: add experimental symbols check to meson build
drivers: process shared lib link dependencies as for libsSeries-acked-by Luca Boccassi <[email protected]>
Applied, thanks