Defining a custom native toolchain

Hi there

I’m trying to find out how I can use a custom toolchain, depending on a build type or flavour.

I’ve found snippets e.g. under https://github.com/gradle/gradle/blob/master/design-docs/done/continuous-delivery-for-c-plus-plus.md#story-build-a-native-component-using-multiple-tool-chains how to overwrite the executables used, but it seems for 2.2.1 this doesn’t work anymore.

What would be the “right” way to define a custom toolchain? And how would I be using it depending on the build type?

Thx for any hints!

Bastian

1 Like

In the meantime, I got a bit further, but ultimatley it’s still not working …

I have the following in my build.gradle:

model {

platforms {

x64 {

architecture “x64”

}

ST31 {

architecture “arm”

}

}

toolChains {

gcc(Gcc) {

target(“x64”) {

}

target(“ST31”) {

cCompiler.executable = “c:/tools/arm/bin/armcc.exe”

}

}

}

}

But with the used ARM compiler, unfortunately I get

Execution failed for task ‘ST31HelloExecutable’.

No tool chain is available to build for platform ‘ST31’:

  • Tool chain ‘gcc’ (GNU GCC): Could not determine GCC version: armcc.exe produced unexpected output.

So it looks the compiler isn’t GCC-compatible :frowning:

Is there any way at the moment to plug in a non-GCC-compatible compiler?