From 3a8471906fd876f046fc05f867660d7f3730f9dd Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 12 May 2023 14:11:17 -0700 Subject: [PATCH] libsysprof-analyze: build static library for testing internals Otherwise we can't test our private API which very much will need it to ensure correctness. --- src/libsysprof-analyze/meson.build | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/libsysprof-analyze/meson.build b/src/libsysprof-analyze/meson.build index f242601d..142b21fc 100644 --- a/src/libsysprof-analyze/meson.build +++ b/src/libsysprof-analyze/meson.build @@ -62,13 +62,27 @@ libsysprof_analyze_deps = [ libsysprof_capture_dep, ] -libsysprof_analyze = library('sysprof-analyze-@0@'.format(soname_major_version), - libsysprof_analyze_public_sources + - libsysprof_analyze_private_sources, +libsysprof_analyze_static = static_library( + 'sysprof-analyze-@0@'.format(soname_major_version), + libsysprof_analyze_public_sources + + libsysprof_analyze_private_sources, + include_directories: [include_directories('.'), ipc_include_dirs, libsysprof_capture_include_dirs], dependencies: libsysprof_analyze_deps, + gnu_symbol_visibility: 'hidden', +) + +libsysprof_analyze_static_dep = declare_dependency( + link_with: libsysprof_analyze_static, + dependencies: libsysprof_analyze_deps, + include_directories: [include_directories('.'), + libsysprof_capture_include_dirs], +) + +libsysprof_analyze = library('sysprof-analyze-@0@'.format(soname_major_version), + dependencies: [libsysprof_analyze_static_dep], gnu_symbol_visibility: 'hidden', version: '@0@.0.0'.format(soname_major_version), darwin_versions: '@0@.0'.format(soname_major_version),