gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
92 stars 8 forks source link

Built in support for mingw multi-architecture compilation #969

Open ghale opened 5 years ago

ghale commented 5 years ago

We can currently discover a single-target mingw64 or mingw32 toolchain on the path. You can also configure a Gradle toolchain to build both 32 and 64 bit by specifying the path to both toolchains and adding a platform-specific configuration to find the compiler (and other tools) for the other target architecture (see https://github.com/gradle/gradle/pull/8123 for how this is configured in our test infrastructure). There does not seem to be an official multi-architecture toolchain for mingw - just the separate toolchains that can be combined to get multi-architecture support.

We should consider discovering multiple mingw toolchains on the path and handling multi-architecture builds transparently. This could be done by constructing a single Gradle toolchain with platform-specific configuration or (probably better) constructing multiple Gradle toolchains with appropriate target support selectors.