Merge pull request #61130 from wudanzy/master

Update check-large-objects.sh to be language neutral
This commit is contained in:
Alexey Milovidov 2024-03-16 12:50:50 +03:00 committed by GitHub
commit caf0da39fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ TU_EXCLUDES=(
Aggregator
)
if find $1 -name '*.o' | xargs wc -c | grep -v total | sort -rn | awk '{ if ($1 > 50000000) print }' \
if find $1 -name '*.o' | xargs wc -c | grep --regexp='\.o$' | sort -rn | awk '{ if ($1 > 50000000) print }' \
| grep -v -f <(printf "%s\n" "${TU_EXCLUDES[@]}")
then
echo "^ It's not allowed to have so large translation units."