Commit 4b6252b
committed
e2e 744 depended on the host having a C runtime, and on a key mcpp ignores
TWO DEFECTS IN ONE TEST, AND THE SHARD FOUND THE FIRST.
The link it examines was an ordinary hosted one, so it needed startup files
that the graph's C library --- a marker package supplying no C library at all
--- does not provide. They came from the host: present on a developer's
machine, absent in the container the Linux shard runs in, where the link died
before it ever reached the symbol under examination:
/usr/bin/ld: cannot find crt1.o: No such file or directory
A test whose subject is a link diagnostic must not depend on anything else
about the link succeeding up to that point. It is freestanding now
(`-nostdlib -nostartfiles -static`, and an entry point of its own), so exactly
one symbol is undefined and it is the one being examined.
THE SECOND DEFECT WAS IN THE REPAIR. Those flags were first written as
`[targets.<name>] ldflags`, which is not a key mcpp has: the manifest reports
`unsupported key 'ldflags' (ignored)` and carries on. The link then still
failed, still named the symbol, and still carried the note, so all four legs
passed while the arrangement they rest on had not happened. `build.ldflags` is
the spelling that exists, and the flags are now measured on the emitted link
line rather than assumed.
Leg E asserts the arrangement: no key was ignored, and the link never reached
the host's C runtime. Putting the flags back in the target fails E and only E
--- A through D go on passing, which is the whole reason E is there. A warning
printed into a passing test is invisible.1 parent 4d1748a commit 4b6252b
1 file changed
Lines changed: 45 additions & 1 deletion
Lines changed: 45 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
24 | 45 | | |
25 | 46 | | |
26 | 47 | | |
| |||
34 | 55 | | |
35 | 56 | | |
36 | 57 | | |
37 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
38 | 61 | | |
39 | 62 | | |
40 | 63 | | |
| |||
50 | 73 | | |
51 | 74 | | |
52 | 75 | | |
| 76 | + | |
53 | 77 | | |
54 | 78 | | |
55 | 79 | | |
| |||
107 | 131 | | |
108 | 132 | | |
109 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
110 | 154 | | |
0 commit comments