]> granicus.if.org Git - llvm/commit
Switch external cvtres.exe for llvm's own resource library.
authorEric Beckmann <ecbeckmann@google.com>
Fri, 16 Jun 2017 21:13:24 +0000 (21:13 +0000)
committerEric Beckmann <ecbeckmann@google.com>
Fri, 16 Jun 2017 21:13:24 +0000 (21:13 +0000)
commitc501cd4b208d5e23be5356eceb93254f48a11bc7
treef01760ac7cb5de0598a990820a611707bb3e2868
parent512a2c924aa92c5c6663bb2d03e60811ea33a020
Switch external cvtres.exe for llvm's own resource library.

In this patch, I flip the switch in DriverUtils from using the external
cvtres.exe tool to using the Windows Resource library in llvm.

I also fixed a bug where .rsrc sections were marked as discardable
memory and therefore were placed in the wrong order in the final PE.

Furthermore, I modified WindowsResource to write the coff directly to a
memory buffer instead of to file, also had it use the machine types
already declared in COFF.h instead creating my own enum.

Finally, I flipped the switch to allow all unit tests that had
previously run only on windows due to a winres dependency to run
cross-platform.

Reviewers: zturner, ruiu

Subscribers: llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D34265

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305592 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/WindowsResource.h
lib/Object/WindowsResource.cpp
tools/llvm-cvtres/llvm-cvtres.cpp