aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrandon Maier <brandon.maier@gmail.com>2025-03-06 20:30:47 -0600
committerDavid Gibson <david@gibson.dropbear.id.au>2025-03-13 16:19:27 +1100
commitdd1b3e532d228ed75d34480ee539f71b76a4fa89 (patch)
tree1a5d4fdba4b002d7cd8688668a243fd68101d44f /tests
parent1ccd232709d409798aac93f45b2a2e1c43e98ec4 (diff)
downloaddtc-dd1b3e532d228ed75d34480ee539f71b76a4fa89.zip
dtc-dd1b3e532d228ed75d34480ee539f71b76a4fa89.tar.gz
dtc-dd1b3e532d228ed75d34480ee539f71b76a4fa89.tar.bz2
meson: support building libfdt without static library
Some packaging systems like NixOS don't support compiling static libraries. However libfdt's meson.build uses `both_library()` which forces the build to always compile shared and static libraries. Removing `both_library()` will make packaging easier. libfdt uses `both_libraries()` to support the 'static-build' option. But we do not need the 'static-build' option as Meson can natively build static using > meson setup builddir/ -Dc_link_args='-static' --prefer-static --default-library=static So drop 'static-build' and then replace `both_libraries()` with `library()`. Signed-off-by: Brandon Maier <brandon.maier@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/meson.build b/tests/meson.build
index f1044b9..52d657e 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -98,22 +98,20 @@ tests += [
'truncated_string',
]
+test_deps = [testutil_dep, util_dep, libfdt_dep]
+
dl = cc.find_library('dl', required: false)
-if dl.found() and not static_build
+if dl.found()
tests += [
'asm_tree_dump',
'value-labels',
]
-endif
-
-test_deps = [testutil_dep, util_dep, libfdt_dep]
-if not static_build
test_deps += [dl]
endif
tests_exe = []
foreach t: tests
- tests_exe += executable(t, files(t + '.c'), dependencies: test_deps, link_args: extra_link_args, build_by_default: false)
+ tests_exe += executable(t, files(t + '.c'), dependencies: test_deps, build_by_default: false)
endforeach
run_tests = find_program('run_tests.sh')