mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-10 15:49:19 +00:00
add more checks in the script
This commit is contained in:
parent
a235abc1ef
commit
71e2f5a23e
20
debian/llvm-compile-lto-elf.sh
vendored
20
debian/llvm-compile-lto-elf.sh
vendored
@ -1,10 +1,25 @@
|
||||
#!/usr/bin/bash -eu
|
||||
|
||||
# Initial version:
|
||||
# https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/brp-llvm-compile-lto-elf
|
||||
# https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/brp-llvm-compile-lto-elf
|
||||
|
||||
CLANG_FLAGS=$@
|
||||
|
||||
if test -z $P_TO_LLVM; then
|
||||
echo "P_TO_LLVM isn't set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z $NJOBS; then
|
||||
echo "NJOBS isn't set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z $VERSION; then
|
||||
echo "VERSION isn't set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NCPUS=$NJOBS
|
||||
|
||||
check_convert_bitcode () {
|
||||
@ -40,6 +55,5 @@ check_convert_bitcode () {
|
||||
|
||||
echo "Checking for LLVM bitcode artifacts"
|
||||
export -f check_convert_bitcode
|
||||
export P
|
||||
find "${P_TO_LLVM}/debian/" -type f -name "*.[ao]" -print0 | \
|
||||
find "$P_TO_LLVM/debian/" -type f -name "*.[ao]" -print0 | \
|
||||
xargs -0 -r -n1 -P$NCPUS bash -c "check_convert_bitcode \$@ $CLANG_FLAGS" ARG0
|
||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -823,7 +823,7 @@ override_dh_auto_install:
|
||||
|
||||
ifeq (${LTO_ENABLE},yes)
|
||||
# with LTO, .a contains llvm ir instead of native code. So, recompile them
|
||||
NJOBS="$(NJOBS)" P_TO_LLVM="$(CURDIR)" VERSION=$(LLVM_VERSION) bash debian/llvm-compile-lto-elf.sh $(CXXFLAGS_EXTRA)
|
||||
NJOBS="$(NJOBS)" P_TO_LLVM="$(CURDIR)" VERSION=$(LLVM_VERSION) bash -v debian/llvm-compile-lto-elf.sh $(CXXFLAGS_EXTRA)
|
||||
endif
|
||||
|
||||
# install/fast enables a make install without recompiling temporary files
|
||||
|
Loading…
Reference in New Issue
Block a user