egl: use new symbols check script

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Eric Engestrom 2018-10-11 14:40:28 +01:00 committed by Eric Engestrom
parent 176f350fcf
commit 1172263c87
2 changed files with 10 additions and 30 deletions

24
src/egl/egl-symbols-check → src/egl/egl-symbols.txt Executable file → Normal file
View File

@ -1,20 +1,3 @@
#!/bin/sh
set -eu
if [ "$(uname)" = "Darwin" ]
then
LIB=${1-.libs/libEGL.dylib}
else
LIB=${1-.libs/libEGL.so}
fi
if ! [ -f "$LIB" ]
then
exit 1
fi
FUNCS=$($NM -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
eglBindAPI
eglBindTexImage
eglChooseConfig
@ -61,10 +44,3 @@ eglWaitNative
eglWaitSync
MesaGLInteropEGLQueryDeviceInfo
MesaGLInteropEGLExportObject
_fini
_init
EOF
done)
test ! -n "$FUNCS" || echo $FUNCS
test ! -n "$FUNCS"

View File

@ -196,13 +196,17 @@ if with_tests and prog_nm.found()
if with_glvnd
# TODO: add glvnd symbol check
else
test('egl-symbols-check',
find_program('egl-symbols-check'),
env : env_test,
args : libegl,
suite : ['egl'],
)
egl_symbols = files('egl-symbols.txt')
endif
test('egl-symbols-check',
symbols_check,
args : [
'--lib', libegl,
'--symbols-file', egl_symbols,
'--nm', prog_nm.path(),
],
suite : ['egl'],
)
test('egl-entrypoint-check',
find_program('egl-entrypoint-check'),
env : ['srcdir=' + meson.current_source_dir()],