]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: don't try to guess versioned clang/llvm-strip bins for cross compile
authorJames Hilliard <james.hilliard1@gmail.com>
Sat, 25 Dec 2021 10:16:57 +0000 (03:16 -0700)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Dec 2021 13:37:04 +0000 (22:37 +0900)
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.

meson.build

index ef9a0278c975ec1b95abb127e9202eefeb9a015a..17b48d2af4f44b3437f82ee26a17c219ee332d93 100644 (file)
@@ -1006,11 +1006,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