mingw GCC using ld.bfd emits diagnostics that include
"-plugin-opt=-pass-through=-lmoldname" and this triggers a match for
mold when it should not.
Instead, always check the very beginning of the output for the linker
id. This is pretty consistent:
- it is always on stdout
- GCC may put additional things on stderr we don't care about
- swift is bizarre and on some OSes redirects the linker stdout to
swiftc's stderr, but it will still be the only stderr; we didn't even
check stderr at all until commit 712cbe0568
For gold/bfd linkers, the linker id is always the *second* word, after
the legally mandated "GNU" we already check for.
pull/10435/head
parent
704cd1a79d
commit
6757e4f07c
1 changed files with 4 additions and 2 deletions
Loading…
Reference in new issue