1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

meson: don't try to guess versioned clang/llvm-strip bins for cross compile

This should simplify overriding the program locations as the binary
names should now not change if cross compiling.

It's likely any attempts at autodetecting these in cross environments will
be brittle at best so lets just disable it.

(cherry picked from commit 4b7b73c714)
This commit is contained in:
James Hilliard 2021-12-25 03:16:57 -07:00 committed by Zbigniew Jędrzejewski-Szmek
parent 9bcf483b11
commit 109c67c46d

View File

@ -997,11 +997,11 @@ else
# Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
# (like clang-10/llvm-strip-10)
clang_bin = cc.get_id() == 'clang' ? cc.cmd_array()[0] : 'clang'
if clang_bin.contains('afl-clang') or clang_bin.contains('hfuzz-clang')
if meson.is_cross_build() or clang_bin.contains('afl-clang') or clang_bin.contains('hfuzz-clang')
clang_bin = 'clang'
endif
clang = find_program(clang_bin, required : bpf_framework_required)
if clang.found()
if not meson.is_cross_build() and clang.found()
llvm_strip_bin = run_command(clang, '--print-prog-name', 'llvm-strip',
check : true).stdout().strip()
else