mirror of
https://github.com/skeeto/w64devkit.git
synced 2026-10-23 06:08:56 +03:00
Replace the loosely coordinated collection of x86 build arguments with a single VARIANT selector. Define x64, x86, and multilib configuration stages, then select the requested stage as the common cross-compiler base. This keeps each supported configuration closed and prevents callers from combining incompatible architecture settings. Make x64 the default standalone profile. It targets x86_64-w64-mingw32, disables GCC multilib support, builds only the 64-bit CRT, and omits the secondary 32-bit libraries and aliases. Keep the standalone x86 behavior in its own profile. It targets i686-w64-mingw32, retains the Pentium 4 default, enables only the 32-bit CRT, preserves the Windows XP header default and manifest behavior, selects the 32-bit BusyBox and NSIS configurations, disables zstd threading, and raises _WIN32_WINNT only while building CMake. CMake and its bundled curl require at least Windows Vista APIs, so the C and C++ flags continue to target Windows 7 without changing the XP-oriented default of the installed toolchain. Define multilib as an x86_64 compiler with GCC multilib enabled, both CRT library sets installed, and the existing i686 forwarding aliases. Use a dedicated EXTRA_32 setting for the secondary lib32 libraries, winpthreads builds, thread support object, and aliases instead of inferring that work from the spelling of a GCC configure option. Expose independent CRT_LIB32 and CRT_LIB64 settings so each profile selects exactly the runtime libraries it needs. Pass the profile's CMake C and C++ flags directly rather than building an optional argument list through shell positional parameters. Keep all other profile-specific values next to the selected base stage, including GCC architecture and manifest flags, BusyBox configuration, zstd options, and NSIS target architecture. Simplify multibuild.sh to pass only VARIANT to Docker. Add -m for the multilib flavor, make -a build all three profiles, and remove the old argument-file and Dockerfile-patch fallback paths. Update unsigned and signed CI builds to select x64 or x86 directly, remove the obsolete variant-x86.args bundle, and document the new build interface. Verify all three profiles with docker build --check and complete cross toolchain builds. Smoke-test x64 and x86 compilation, plus both the 64-bit compiler and i686 alias in the multilib profile. Also build the x64 and x86 CMake targets to exercise both the empty and Windows 7 CMake flag configurations.