Native Plugins and CI Server


(David Cowden) #1

What is the recommended way to compile native code on two different platforms with different native compiler toolchains? For example, I have an osx host but my ci infrastructure runs on linux.

If I specify both clang and gcc, if clang comes first then when compiling on linux the resolver will pick clang and try to execute clang binaries–which don’t exist. So I currently have something like:

model {
    toolChains {
        if (OperatingSystem.current().isLinux()) {
            host(Gcc)
        } else {
            host(Clang)
        }
    }
}

This feels very wrong. Is there a correct way to do this short of making sure all my hosts have the exact same toolchain or checking toolchains into my project directory and building off them?