Skip to content

Commit fa9117f

Browse files
committed
[temp] probe: the C command of a dependency unit
1 parent d60d0b7 commit fa9117f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎.github/workflows/probe-win-unit-av.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ jobs:
4242
echo "== $n"; grep -o 'fms-runtime-lib=[a-z_]*' "$n" | sort | uniq -c
4343
grep -o -E '(/|-)(MD|MT)d?\b' "$n" | sort | uniq -c | head
4444
done
45+
echo "== the C flags of the file and of one xz unit"
46+
grep -n -E '^(cflags|cxxflags|cc|cxx) ' "$dir/build.ninja" | cut -c1-700
47+
grep -n -B1 -A6 'crc32_fast.o' "$dir/build.ninja" | cut -c1-900 | head -30
48+
grep -n -A8 '^rule c_object' "$dir/build.ninja" | cut -c1-400
49+
python - "$dir/compile_commands.json" <<'PY'
50+
import json, sys
51+
for e in json.load(open(sys.argv[1], encoding="utf-8")):
52+
f = e.get("file", "")
53+
if "crc32_fast" in f or f.endswith("compress_codecs.cpp"):
54+
c = e.get("command") or " ".join(e.get("arguments", []))
55+
print("CDB", f); print(" ", c[:1500])
56+
PY
4557
echo "== the default libraries each object names"
4658
for pat in 'compat_xz/.*crc32_fast' 'compat_zstd' 'compat_zlib' 'mcpplibs_os' 'mcpplibs_mtest' 'nlohmann' 'test_pack_distribution' 'compress_codecs' 'mwrap'; do
4759
o=$(find "$dir" -type f \( -name '*.o' -o -name '*.obj' \) | grep -E "$pat" | head -1)

0 commit comments

Comments
 (0)