Skip to content

Commit

Permalink
FIX: ninja tests fails to build for 'shared'
Browse files Browse the repository at this point in the history
When building a specific target (e.g. 'tests'), the job dependency pointed
to 'libbotan-3.so.6'. This target will explicitly build just 'libbotan-3.so.6'
but fail to set up the required symlinks 'libbotan-3.so' and '.so.6.6.0'. As
a result, the linker command with `-lbotan-3` will fail to find the shared
object.
  • Loading branch information
reneme committed Sep 6, 2024
1 parent 33c953a commit d8460eb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/build-data/ninja.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ rule link_tests

# Executable targets

build %{cli_exe}: link_cli %{join cli_objs} | %{library_targets}
build %{cli_exe}: link_cli %{join cli_objs} | libs

build %{test_exe}: link_tests %{join test_objs} | %{library_targets}
build %{test_exe}: link_tests %{join test_objs} | libs

%{if build_fuzzers}

Expand Down Expand Up @@ -120,7 +120,7 @@ build examples: phony | %{example_bin}

%{if build_bogo_shim}

build botan_bogo_shim: link_cli bogo_shim_object | %{library_targets}
build botan_bogo_shim: link_cli bogo_shim_object | libs

# BoGo shim
build %{out_dir}/bogo_shim_object: compile_exe %{bogo_shim_src}
Expand All @@ -129,7 +129,7 @@ build %{out_dir}/bogo_shim_object: compile_exe %{bogo_shim_src}

%{if build_ct_selftest}

build botan_ct_selftest: link_cli ct_selftest_object | %{library_targets}
build botan_ct_selftest: link_cli ct_selftest_object | libs

build %{out_dir}/ct_selftest_object: compile_exe %{ct_selftest_src}

Expand Down Expand Up @@ -208,10 +208,10 @@ build %{obj}: compile_exe %{src}
%{for fuzzer_build_info}
build %{obj}: compile_exe %{src}

build %{exe}: link_fuzzer %{obj} | %{library_targets}
build %{exe}: link_fuzzer %{obj} | libs
%{endfor}

%{for examples_build_info}
build %{obj}: compile_example_exe %{src}
build %{exe}: link_cli %{obj} | %{library_targets}
build %{exe}: link_cli %{obj} | libs
%{endfor}

0 comments on commit d8460eb

Please sign in to comment.