|
28 | 28 | echo "print-launch: $?"; tail -3 launch.err |
29 | 29 | cat launch.json | head -c 6000 |
30 | 30 | exit 0 |
| 31 | + - name: which C library model each part was compiled for, and what the link says |
| 32 | + shell: bash |
| 33 | + continue-on-error: true |
| 34 | + run: | |
| 35 | + set +e +o pipefail |
| 36 | + export MCPP_VENDORED_XLINGS=$(cygpath -w "$USERPROFILE/.xlings/subos/default/bin/xlings.exe") |
| 37 | + llvm="$USERPROFILE/.mcpp/registry/data/xpkgs/xim-x-llvm/23.1.3/bin" |
| 38 | + exe=$(find target -name unit.exe | head -1) |
| 39 | + dir=$(dirname "$(dirname "$exe")") |
| 40 | + echo "dir=$dir"; ls "$dir" | head -30 |
| 41 | + for n in $(find "$dir" -maxdepth 2 -name '*.ninja' | head -5); do |
| 42 | + echo "== $n"; grep -o 'fms-runtime-lib=[a-z_]*' "$n" | sort | uniq -c |
| 43 | + grep -o -E '(/|-)(MD|MT)d?\b' "$n" | sort | uniq -c | head |
| 44 | + done |
| 45 | + echo "== the default libraries each object names" |
| 46 | + for pat in 'compat_xz/.*crc32_fast' 'compat_zstd' 'compat_zlib' 'mcpplibs_os' 'mcpplibs_mtest' 'nlohmann' 'test_pack_distribution' 'compress_codecs' 'mwrap'; do |
| 47 | + o=$(find "$dir" -type f \( -name '*.o' -o -name '*.obj' \) | grep -E "$pat" | head -1) |
| 48 | + [ -n "$o" ] || { echo "$pat: no object"; continue; } |
| 49 | + echo "$pat: $o" |
| 50 | + "$llvm/llvm-readobj.exe" --coff-directives "$o" 2>/dev/null | tr ' ' '\n' | grep -i -E 'defaultlib|alternatename|failifmismatch' | sort -u | head -12 |
| 51 | + done |
| 52 | + echo "== every default library and mismatch statement of the build" |
| 53 | + find "$dir" -type f \( -name '*.o' -o -name '*.obj' \) > objs.txt; wc -l objs.txt |
| 54 | + while read -r o; do "$llvm/llvm-readobj.exe" --coff-directives "$o" 2>/dev/null | tr ' ' '\n' | grep -i -E 'defaultlib|failifmismatch.*RuntimeLibrary|alternatename' ; done < objs.txt | sort | uniq -c | sort -rn | head -40 |
| 55 | + echo "== the link, again, with what the linker says" |
| 56 | + rm -f "$exe" |
| 57 | + mcpp test test_pack_distribution --no-run --verbose > relink.log 2>&1 || mcpp test test_pack_distribution --no-run -v > relink.log 2>&1 |
| 58 | + grep -a -i -E 'warning|locally defined|lld-link' relink.log | cut -c1-300 | head -60 |
| 59 | + grep -a -c . relink.log; tail -5 relink.log | cut -c1-300 |
31 | 60 | - name: where the call came from |
32 | 61 | shell: bash |
33 | 62 | continue-on-error: true |
|
0 commit comments