[LLD][COFF] Identify /GL object files which are inside libraries
authorPengxuan Zheng <pzheng@quicinc.com>
Tue, 9 Aug 2022 00:49:08 +0000 (17:49 -0700)
committerPengxuan Zheng <pzheng@quicinc.com>
Tue, 9 Aug 2022 19:32:35 +0000 (12:32 -0700)
commitc951edb7b22e709e50b8ae2ea6bce46f1d7d2741
tree3273681c5d9284fd5691b2315ed67e2c6181466c
parent9893b26dfa75545404ab9d079a7b2de696f8cd4c
[LLD][COFF] Identify /GL object files which are inside libraries

With D26647, we can already identify input object files compiled by cl.exe with
/GL. It seems to be helpful to do the same and print an error message for those
object files compiled with /GL but are inside libraries/archives too.

Reviewed By: rnk, thieta

Differential Revision: https://reviews.llvm.org/D131458
lld/COFF/Driver.cpp
lld/test/COFF/Inputs/cl-gl.lib [new file with mode: 0755]
lld/test/COFF/cl-gl.test