aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTero Tervala <tero.tervala@unikie.com>2022-06-29 19:35:57 +0300
committerDavid Gibson <david@gibson.dropbear.id.au>2022-07-27 16:38:45 +1000
commit7ad60734b1c1ac12856674fa7913fc9492dc5d28 (patch)
tree8d4f765563e116a81d39b4d1384834f0f599cf3a /tests
parentfd9b8c96c780c90dd0f1af46963bf2c52de1f0a6 (diff)
downloaddtc-7ad60734b1c1ac12856674fa7913fc9492dc5d28.zip
dtc-7ad60734b1c1ac12856674fa7913fc9492dc5d28.tar.gz
dtc-7ad60734b1c1ac12856674fa7913fc9492dc5d28.tar.bz2
Allow static building with meson
Added "static-build" option in the meson_options.txt. Setting it to "true" allows static building. Signed-off-by: Tero Tervala <tero.tervala@unikie.com> Message-Id: <20220629163557.932298-1-tero.tervala@unikie.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 3776fef..4ac154a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -96,15 +96,20 @@ tests += [
]
dl = cc.find_library('dl', required: false)
-if dl.found()
+if dl.found() and not static_build
tests += [
'asm_tree_dump',
'value-labels',
]
endif
+test_deps = [testutil_dep, util_dep, libfdt_dep]
+if not static_build
+ test_deps += [dl]
+endif
+
foreach t: tests
- executable(t, files(t + '.c'), dependencies: [testutil_dep, util_dep, libfdt_dep, dl])
+ executable(t, files(t + '.c'), dependencies: test_deps, link_args: extra_link_args)
endforeach
run_tests = find_program('run_tests.sh')