Add a new OperatingSystem?

How can I add a new target operating system such as ios or android so that I can cross compile for a target platform such as ios-arm64 or android-x86_64?

The toolchain passes around a target os and if you specify, for example, ios you’ll get a target os of UNIX. I can pass all the proper flags to the targets specified when creating a toolchain (so that compiling works), but internally gradle will still use the target os to determine things such as file extensions and some linker flags, etc. And its not good if, because of this, the target platform ends up matching the current platform.

1 Like