See #465
To compile the build tool `bin2c`, add a target with `add_executable()`
on visual studio instead of using `HostCompile.cmake` because running
`cl.exe` fails in the appveyor visual studio environment, see:
https://developercommunity.visualstudio.com/content/problem/325122/c1356-unable-to-find-mspdbcoredll.html
Also update the dependencies module to latest.
appveyor build now tested to work.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
gcc lto wrapper commands such as `gcc-ar` will segfault with some
versions of gcc 7.x when called via an absolute path, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80717
Generalize the mechanism for compiling a small C program on the host
(currently used for bin2c for Wx resources) and use it to wrap the gcc
wrappers in a little executable that prepends their dirname to PATH and
runs them with `execvp()`.
Make LTO default to ON again, except on win32 with gcc < 7, because
those toolchains produce broken binaries with LTO enabled.
Also add `-ffat-lto-objects` to compiler flags for gcc when LTO is
enabled, this will increase the chances that the LTO build will succeed
even if there are issues with the binutils wrappers. Clang does not
support this.