Files
ClickHouse/utils/check-large-objects.sh
Alexey MilovidovandClaude Opus 5.5 d69f25fad6 Exclude AdaptiveAggregation/Merge.cpp from the large object check
The `CH Inc sync` build failed in `utils/check-large-objects.sh`: with ThinLTO the object of
`src/Interpreters/AdaptiveAggregation/Merge.cpp` is 62 MB, over the 50 MB limit (46 MB in a
non-LTO build). It instantiates the merge kernels for every aggregation method, as `Aggregator.cpp`
does, which is excluded for the same reason. The pattern names the path, so the `MergeTree`
translation units stay checked.

https://github.com/ClickHouse/clickhouse-private/actions/runs/39318608382/job/118289663759

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 10:02:18 +00:00

21 lines
659 B
Bash
Executable File

#!/usr/bin/env bash
export LC_ALL=C # The "total" should be printed without localization
# Check that there are no new translation units compiled to an object file larger than a certain size.
TU_EXCLUDES=(
AdaptiveAggregation/Merge.cpp
AggregateFunctionUniq
Aggregator
FunctionsNumericIndexedVector
)
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."
echo " To bypass this check, configure the build with -DCHECK_LARGE_OBJECT_SIZES=0"
exit 1
fi