On Sat, Apr 25, 2020 at 1:02 PM Haiyue Wang <haiyue.w...@intel.com> wrote: > > Add checks during build to ensure that all symbols in the INTERNAL > version map section have __internal tags on their definitions, and > enable the warnings needed to announce their use. > > Signed-off-by: Haiyue Wang <haiyue.w...@intel.com> > --- > MAINTAINERS | 2 +- > ...-experimental-syms.sh => check-symbols.sh} | 31 +++++++++++++++++++ > buildtools/meson.build | 2 +- > mk/internal/rte.compile-pre.mk | 6 ++-- > 4 files changed, 36 insertions(+), 5 deletions(-) > rename buildtools/{check-experimental-syms.sh => check-symbols.sh} (61%)
Just missing a little update on drivers/meson.build and lib/meson.build. Squashed with: diff --git a/buildtools/meson.build b/buildtools/meson.build index 3e8d31b0c5..d5f8291beb 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -6,7 +6,7 @@ subdir('pmdinfogen') pkgconf = find_program('pkg-config', 'pkgconf', required: false) pmdinfo = find_program('gen-pmdinfo-cfile.sh') list_dir_globs = find_program('list-dir-globs.py') -check_experimental_syms = find_program('check-symbols.sh') +check_symbols = find_program('check-symbols.sh') ldflags_ibverbs_static = find_program('options-ibverbs-static.sh') # set up map-to-def script using python, either built-in or external @@ -20,4 +20,4 @@ map_to_def_cmd = py3 + files('map_to_def.py') sphinx_wrapper = py3 + files('call-sphinx-build.py') # stable ABI always starts with "DPDK_" -is_experimental_cmd = [find_program('grep', 'findstr'), '^DPDK_'] +is_stable_cmd = [find_program('grep', 'findstr'), '^DPDK_'] diff --git a/drivers/meson.build b/drivers/meson.build index f3dd23dd43..dc293b270b 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -131,15 +131,15 @@ foreach class:dpdk_driver_classes meson.current_source_dir(), drv_path, lib_name) - is_experimental = run_command(is_experimental_cmd, - files(version_map)).returncode() + is_stable = run_command(is_stable_cmd, + files(version_map)).returncode() == 0 - if is_experimental != 0 - lib_version = experimental_abi_version - so_version = experimental_so_version - else + if is_stable lib_version = abi_version so_version = stable_so_version + else + lib_version = experimental_abi_version + so_version = experimental_so_version endif # now build the static driver @@ -168,14 +168,14 @@ foreach class:dpdk_driver_classes else lk_args = ['-Wl,--version-script=' + version_map] # on unix systems check the output of the - # experimental syms script, using it as a + # check-symbols.sh script, using it as a # dependency of the .so build - lk_deps += custom_target(lib_name + '.exp_chk', - command: [check_experimental_syms, + lk_deps += custom_target(lib_name + '.sym_chk', + command: [check_symbols, version_map, '@INPUT@'], capture: true, input: static_lib, - output: lib_name + '.exp_chk') + output: lib_name + '.sym_chk') endif shared_lib = shared_library(lib_name, diff --git a/lib/meson.build b/lib/meson.build index 8697941ae0..07a65a6256 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -109,15 +109,15 @@ foreach l:libraries version_map = '@0@/@1@/rte_@2@_version.map'.format( meson.current_source_dir(), dir_name, name) - is_experimental = run_command(is_experimental_cmd, - files(version_map)).returncode() + is_stable = run_command(is_stable_cmd, + files(version_map)).returncode() == 0 - if is_experimental != 0 - lib_version = experimental_abi_version - so_version = experimental_so_version - else + if is_stable lib_version = abi_version so_version = stable_so_version + else + lib_version = experimental_abi_version + so_version = experimental_so_version endif # first build static lib @@ -160,14 +160,14 @@ foreach l:libraries lk_deps = [version_map, def_file] if not is_windows # on unix systems check the output of the - # experimental syms script, using it as a + # check-symbols.sh script, using it as a # dependency of the .so build - lk_deps += custom_target(name + '.exp_chk', - command: [check_experimental_syms, + lk_deps += custom_target(name + '.sym_chk', + command: [check_symbols, version_map, '@INPUT@'], capture: true, input: static_lib, - output: name + '.exp_chk') + output: name + '.sym_chk') endif shared_lib = shared_library(libname, -- David Marchand