bin/symbols-check.py: add --ignore-symbol argument

This will be used by radv to ignore 'the ac_init_llvm_once' symbol,
which is not part of vulkan-icd-symbols.txt but is required to be
exported to improve interop with radeonsi/vaapi.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5648>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2020-07-08 13:55:24 +02:00
parent 51bdaf0b60
commit 8da237428c

View File

@ -88,6 +88,9 @@ def main():
parser.add_argument('--dumpbin', parser.add_argument('--dumpbin',
action='store', action='store',
help='path to binary (or name in $PATH)') help='path to binary (or name in $PATH)')
parser.add_argument('--ignore-symbol',
action='append',
help='do not process this symbol')
args = parser.parse_args() args = parser.parse_args()
try: try:
@ -147,6 +150,8 @@ def main():
continue continue
if symbol in optional_symbols: if symbol in optional_symbols:
continue continue
if args.ignore_symbol and symbol in args.ignore_symbol:
continue
if symbol[:2] == '_Z': if symbol[:2] == '_Z':
# As ajax found out, the compiler intentionally exports symbols # As ajax found out, the compiler intentionally exports symbols
# that we explicitely asked it not to export, and we can't do # that we explicitely asked it not to export, and we can't do