From 19a718bc13824eae925ece55d04ebc07cd00cf62 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 18 Sep 2018 10:14:09 +0200 Subject: build: meson: fix computing NM exported symbols The script didn't include all the symbols needed by plugins because libNetworkManager.a, as built by meson, doesn't include symbols from other static libraries that are linked in. Since we used libNetworkManager.a to know which symbols are potentiall available from NM, the result was an incomplete list. Unfortunately, the only way to include the whole static library is to create a dependency object and use 'link_whole', but this is only available in meson >= 0.46. Since 'link_whole' is available for executables in meson >= 0.40, create a fake executable and use that to enumerate symbols. Also add tests to check that plugins can be loaded correctly. Fixes: dfa2a2b40c866bf7a5484b72639464c31b80e7da --- tools/create-exports-NetworkManager.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh index 7d359005b7..1462501ee3 100755 --- a/tools/create-exports-NetworkManager.sh +++ b/tools/create-exports-NetworkManager.sh @@ -35,7 +35,12 @@ call_nm() { } get_symbols_nm () { - call_nm ./src/${libs}libNetworkManager.a | + if [ -z "$from_meson" ]; then + base=./src/.libs/libNetworkManager.a + else + base=./src/nm-full-symbols + fi + call_nm "$base" | sed -n 's/^[tTDGRBS] //p' | _sort } -- cgit v1.2.1