buildtools: prepare symbol check for Windows
Subsystems (2)
PATCH 1/1 buildtools: prepare symbol check for Windows
The symbol check was implemented so far with shell scripts, relying on objdump and other unix tools preventing it from being run on Windows.
There was also an ask from some maintainers to convert this type of developer checks to python scripts, to make it easier to extend and maintain.
The new implementation still performs the four consistency checks:
- symbols exported as experimental but missing __rte_experimental flag,
- symbols flagged as experimental but missing export declaration,
- symbols exported as internal but missing __rte_internal flag,
- symbols flagged as internal but missing export declaration,
The initial implementation was done relying on Claude Code (asking it to reimplement the existing check after it analysed the current build flow).
I then cleaned up the python script, removed dumb comments, fixed coding style, fixed MAINTAINERS, fixed some dumb issues (like definition order in buildtools/meson.build).
Actual implementation on Windows seems doable now but is left to an interested party.
--- MAINTAINERS | 5 +- buildtools/check-symbols.py | 324 ++++++++++++++++++++++++++++++++++ buildtools/check-symbols.sh | 73 -------- buildtools/map-list-symbol.sh | 85 --------- buildtools/meson.build | 2 +- drivers/meson.build | 3 - lib/meson.build | 3 - 7 files changed, 327 insertions(+), 168 deletions(-) create mode 100755 buildtools/check-symbols.py delete mode 100755 buildtools/check-symbols.sh delete mode 100755 buildtools/map-list-symbol.sh
MAINTAINERS +2 -3
@@ -121,15 +121,14 @@ F: Makefile F: meson.build F: meson_options.txt F: config/ -F: buildtools/check-symbols.sh -F: buildtools/chkincs/ F: buildtools/call-sphinx-build.py +F: buildtools/check-symbols.py +F: buildtools/chkincs/ F: buildtools/gen-version-map.py F: buildtools/get-cpu-count.py F: buildtools/get-min-meson-version.py F: buildtools/get-numa-count.py F: buildtools/list-dir-globs.py -F: buildtools/map-list-symbol.sh F: buildtools/pkg-config/ F: buildtools/symlink-drivers-solibs.sh F: buildtools/symlink-drivers-solibs.py
buildtools/check-symbols.py new file +324 -0
324 lines not on this page · raw message
buildtools/check-symbols.sh deleted +0 -73
73 lines not on this page · raw message
buildtools/map-list-symbol.sh deleted +0 -85
85 lines not on this page · raw message
buildtools/meson.build +1 -1
@@ -2,7 +2,6 @@ # Copyright(c) 2017-2019 Intel Corporation pkgconf = find_program('pkg-config', 'pkgconf', required: false) -check_symbols = find_program('check-symbols.sh') ldflags_ibverbs_static = find_program('options-ibverbs-static.sh') python3_required_modules = []
@@ -18,6 +17,7 @@ else py3 = ['meson', 'runpython'] endif echo = py3 + ['-c', 'import sys; print(*sys.argv[1:])'] +check_symbols = py3 + files('check-symbols.py') gen_version_map = py3 + files('gen-version-map.py') list_dir_globs = py3 + files('list-dir-globs.py') sphinx_wrapper = py3 + files('call-sphinx-build.py')
drivers/meson.build +0 -3
@@ -321,9 +321,6 @@ foreach subpath:subdirs endif if not is_windows and developer_mode - # on unix systems check the output of the - # check-symbols.sh script, using it as a - # dependency of the .so build lk_deps += custom_target(lib_name + '.sym_chk', command: [check_symbols, version_map.full_path(), '@INPUT@'], capture: true,
lib/meson.build +0 -3
@@ -306,9 +306,6 @@ foreach l:libraries endif if developer_mode and not is_windows - # on unix systems check the output of the - # check-symbols.sh script, using it as a - # dependency of the .so build lk_deps += custom_target(name + '.sym_chk', command: [check_symbols, version_map.full_path(), '@INPUT@'], capture: true,
Signature · 1 line
2.51.0
Quoted 14 lines · David Marchand
The symbol check was implemented so far with shell scripts, relying on objdump and other unix tools preventing it from being run on Windows.
There was also an ask from some maintainers to convert this type of developer checks to python scripts, to make it easier to extend and maintain.
The new implementation still performs the four consistency checks:
- symbols exported as experimental but missing__rte_experimentalflag,
- symbols flagged as experimental but missing export declaration,
- symbols exported as internal but missing__rte_internalflag,
- symbols flagged as internal but missing export declaration,
Quoted 7 lines
The initial implementation was done relying on Claude Code (asking it to reimplement the existing check after it analysed the current build flow).
I then cleaned up the python script, removed dumb comments, fixed coding style, fixed
MAINTAINERS, fixed some dumb issues (like definition order in buildtools/meson.build).
Looks like trusting Claude on the python subtleties was not a good idea. A v2 will be needed, but this change can wait to have a real user. I'll mark as changes requested in patchwork.
Signature · 1 line
David Marchand
PATCH v2 1/1 buildtools: add symbol check to Windows
In reply to David MarchandThe symbol check was implemented so far with shell scripts, relying on objdump and other unix tools preventing it from being run on Windows.
There was also an ask from some maintainers to convert this type of developer checks to python scripts, to make it easier to extend and maintain.
The new implementation still performs the four consistency checks:
- symbols exported as experimental but missing __rte_experimental flag,
- symbols flagged as experimental but missing export declaration,
- symbols exported as internal but missing __rte_internal flag,
- symbols flagged as internal but missing export declaration,
The initial implementation was done relying on Claude Code (asking it to reimplement the existing check after it analysed the current build flow).
I then cleaned up the python script, removed dumb comments, fixed coding style, fixed MAINTAINERS, fixed some dumb issues (like definition order in buildtools/meson.build).
Actual implementation on Windows seems doable now but is left to an interested party.
---
Changes since v1:
- asked Claude to fix compatiblity with Python 3.6,
- removed unused field ArchiveMember.size,
--- MAINTAINERS | 5 +- buildtools/check-symbols.py | 324 ++++++++++++++++++++++++++++++++++ buildtools/check-symbols.sh | 73 -------- buildtools/map-list-symbol.sh | 85 --------- buildtools/meson.build | 2 +- drivers/meson.build | 3 - lib/meson.build | 3 - 7 files changed, 327 insertions(+), 168 deletions(-) create mode 100755 buildtools/check-symbols.py delete mode 100755 buildtools/check-symbols.sh delete mode 100755 buildtools/map-list-symbol.sh
MAINTAINERS +2 -3
@@ -121,15 +121,14 @@ F: Makefile F: meson.build F: meson_options.txt F: config/ -F: buildtools/check-symbols.sh -F: buildtools/chkincs/ F: buildtools/call-sphinx-build.py +F: buildtools/check-symbols.py +F: buildtools/chkincs/ F: buildtools/gen-version-map.py F: buildtools/get-cpu-count.py F: buildtools/get-min-meson-version.py F: buildtools/get-numa-count.py F: buildtools/list-dir-globs.py -F: buildtools/map-list-symbol.sh F: buildtools/pkg-config/ F: buildtools/symlink-drivers-solibs.sh F: buildtools/symlink-drivers-solibs.py
buildtools/check-symbols.py new file +324 -0
324 lines not on this page · raw message
buildtools/check-symbols.sh deleted +0 -73
73 lines not on this page · raw message
buildtools/map-list-symbol.sh deleted +0 -85
85 lines not on this page · raw message
buildtools/meson.build +1 -1
@@ -2,7 +2,6 @@ # Copyright(c) 2017-2019 Intel Corporation pkgconf = find_program('pkg-config', 'pkgconf', required: false) -check_symbols = find_program('check-symbols.sh') ldflags_ibverbs_static = find_program('options-ibverbs-static.sh') python3_required_modules = []
@@ -18,6 +17,7 @@ else py3 = ['meson', 'runpython'] endif echo = py3 + ['-c', 'import sys; print(*sys.argv[1:])'] +check_symbols = py3 + files('check-symbols.py') gen_version_map = py3 + files('gen-version-map.py') list_dir_globs = py3 + files('list-dir-globs.py') sphinx_wrapper = py3 + files('call-sphinx-build.py')
drivers/meson.build +0 -3
@@ -349,9 +349,6 @@ foreach subpath:subdirs endif if not is_windows and developer_mode - # on unix systems check the output of the - # check-symbols.sh script, using it as a - # dependency of the .so build lk_deps += custom_target(lib_name + '.sym_chk', command: [check_symbols, version_map.full_path(), '@INPUT@'], capture: true,
lib/meson.build +0 -3
@@ -303,9 +303,6 @@ foreach l:libraries endif if developer_mode and not is_windows - # on unix systems check the output of the - # check-symbols.sh script, using it as a - # dependency of the .so build lk_deps += custom_target(name + '.sym_chk', command: [check_symbols, version_map.full_path(), '@INPUT@'], capture: true,
Signature · 1 line
2.52.0
Re: [PATCH v2] buildtools: add symbol check to Windows
Quoted 22 lines · David Marchand
The symbol check was implemented so far with shell scripts, relying on objdump and other unix tools preventing it from being run on Windows.
There was also an ask from some maintainers to convert this type of developer checks to python scripts, to make it easier to extend and maintain.
The new implementation still performs the four consistency checks:
- symbols exported as experimental but missing__rte_experimentalflag,
- symbols flagged as experimental but missing export declaration,
- symbols exported as internal but missing__rte_internalflag,
- symbols flagged as internal but missing export declaration,The initial implementation was done relying on Claude Code (asking it to reimplement the existing check after it analysed the current build flow).
I then cleaned up the python script, removed dumb comments, fixed coding style, fixed
MAINTAINERS, fixed some dumb issues (like definition order in buildtools/meson.build).
Quoted 8 lines
Actual implementation on Windows seems doable now but is left to an interested party.
Signed-off-by David Marchand <[email protected]>---
Changes since v1:
- asked Claude to fix compatiblity with Python 3.6,
- removed unused field ArchiveMember.size,
Not much interest, it seems.
I marked it as RFC in patchwork, and I'll leave it there if someone wants to pick it up in the future.
Signature · 1 line
David Marchand