[lld] Check errors from expanding response files
authorHans Wennborg <hans@chromium.org>
Sat, 5 Nov 2022 03:37:45 +0000 (04:37 +0100)
committerHans Wennborg <hans@chromium.org>
Mon, 7 Nov 2022 17:28:33 +0000 (18:28 +0100)
commit19a7939404a3b932c26cd2a6a29f0669acebd702
treea226d0e78a793ed5c24ea5f190a29fa7c78c5a7e
parent265a73043d34af25d88a238b84ed9c0c34321348
[lld] Check errors from expanding response files

Previously the response file expansion code would print the error, but
lld would not exit, which was odd.

lld does response file expansion in the different drivers, but it's also
done in main() first, so it's enough to check there.

By checking for these errors we would have caught when D136090
introduced a bug that made lld print errors for response files which
contained "-rpath @foo".

Differental revision: https://reviews.llvm.org/D137477
lld/test/ELF/basic.s
lld/tools/lld/lld.cpp