Skip to content

Apply flags for cross-compilation

Hanabishi Recca requested to merge (removed):crossflags into main

This MR applies compiler and linker flags for cross-compilation toolchain.


  • 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 MinGW ld.
Edited by Hanabishi Recca

Merge request reports