libllvm-size: Add compat package support

Detect libLLVM path using llvm-config to make the script
reusable with compat packages.
This commit is contained in:
Jesus Checa Hidalgo 2025-02-20 09:19:52 +01:00
commit 5f75e69cbd
2 changed files with 7 additions and 2 deletions

View file

@ -2,5 +2,5 @@ summary: Check that libLLVM.so has been properly stripped
tier: 1
duration: 1m
environment:
LIBLLVM_PATH: /usr/lib64/libLLVM.so
require+:
- llvm-devel

View file

@ -1,5 +1,10 @@
#!/bin/bash -eux
# Retrieve libLLVM path if not set via environment variable. This is necessary
# to make the test flexible enough to use it with both compat and unversioned
# packages.
LIBLLVM_PATH=${LIBLLVM_PATH:-"$(llvm-config --libfiles)"}
# There is a bug in the build process when it runs out of disk space
# while stripping binaries, which causes the strip to fail, but does
# not fail the build. This results in a libLLVM.so that is over 2GB