[PECOFF] Invoke cvtres.exe in the driver.
authorRui Ueyama <ruiu@google.com>
Thu, 10 Jul 2014 20:53:37 +0000 (20:53 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 10 Jul 2014 20:53:37 +0000 (20:53 +0000)
commit31fd9d09b2ac07e0bae0a81d387db89d5090769d
tree31efd09669d2f831ac6dc2fd105dd5764378417c
parent57cacb013f4c29ffab4e932f0543d9b05f32814b
[PECOFF] Invoke cvtres.exe in the driver.

Previously we invoked cvtres.exe for each compiled Windows
resource file. The generated files were then concatenated
and embedded to the executable.

That was not the correct way to merge compiled Windows
resource files. If you just concatenate generated files,
only the first file would be recognized and the rest would
be ignored as trailing garbage.

The right way to merge them is to call cvtres.exe with
multiple input files. In this patch we do that in the
Windows driver.

llvm-svn: 212763
lld/include/lld/ReaderWriter/Reader.h
lld/lib/Driver/WinLinkDriver.cpp
lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
lld/test/pecoff/resource.test
lld/unittests/DriverTests/WinLinkDriverTest.cpp