summaryrefslogtreecommitdiff
path: root/.github/workflows/size.sh
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/size.sh')
-rwxr-xr-x.github/workflows/size.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/size.sh b/.github/workflows/size.sh
new file mode 100755
index 000000000000..d5e2a6181671
--- /dev/null
+++ b/.github/workflows/size.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+#
+# Filters files containing LLVM IR bitcode to properly inspect ELF files
+# statistics for build artifacts in LTO/ThinLTO mode.
+#
+
+NO_LLVM_IR_FILES=()
+
+for f in $@; do
+ if ! file "${f}" | grep -q "LLVM IR bitcode"; then
+ NO_LLVM_IR_FILES+=("${f}")
+ fi
+done
+
+size "${NO_LLVM_IR_FILES[@]}"