Skip to content

Commit c6bd7d1

Browse files
committed
check if llvm-lto available (case where GCC is a default __cc)
1 parent 5612ab1 commit c6bd7d1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fix_lto_intermediates_in_static_libraries

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then
99
exit 0
1010
fi
1111

12+
# Check if llvm-lto is available
13+
if ! command -v llvm-lto >/dev/null 2>&1; then
14+
echo "llvm-lto not found, skipping LLVM IR bitcode compilation."
15+
exit 0
16+
fi
17+
1218
check_convert_bitcode() {
1319
printf "Checking %s for LLVM IR bitcode\n" "${1}"
1420
llvm_file_name="$(realpath ${1})"

0 commit comments

Comments
 (0)