The source project of this merge request has been removed.
Apply flags for cross-compilation
This MR applies compiler and linker flags for cross-compilation toolchain.
Benefits:
- We get optimized and hardened Windows binaries instead of default
-O0
ones. Basically do the same thing as with Linux binaries. - The package size is significantly reduced (from current ~1.3 GiB to ~600 MiB), because optimized binaries take less space.
Existing flags require some tweaking though:
-
-Werror=format-security
compiler flag can't be applied as some Windows code has security warnings. -
-Wl,-z
linker flags are not supported by MinGWld
.
Edited by Hanabishi Recca