AIX xlC and Linux Intel compiler

Hi,
Does gradle support xlC compiler on AIX and Intel Compiler on Linux ? If not, what could i do to use them with gradle?

Thanks,

I’d suggest it depends really on how closely the compilers follow a gcc style command line and arguments. This will determine whether you can hijack/redirect the built in gcc compiler, or if you need to add your own toolchain implementation.

Having had experience of both - if you can get away with the existing gcc route - it’s a lot less pain.

For example, I know XLC ships with wrappers called gxlc and gxlc++ which are gcc command line compatible and translate the arguments, calling xlc under the hood. Going this route, you’d need something like :

model {
	toolChains {
		gcc(Gcc) {
			target("aix_ppc64") {
				cCompiler.executable = "gxlc"
				cppCompiler.executable = "gxlc++"
                                ..........

Documentation and examples are pretty good in this space.

I’m not familiar with the Intel compiler, so can’t really comment - but if you can’t leverage the gcc compatibility, you’re in to implementing your own compiler as a plugin.

It can vary from easy to non-trivial and there’s a good amount of boiler plate.

In case it helps - quick google suggests someone has already done it for intel icc - https://github.com/dreamstalker/gradle-cpp-plugin/tree/master/src/main/groovy/org/doomedsociety/gradlecpp/toolchain/icc

Using either that, or the gradle source for gcc/clang/visual c++ as a starting point is your best bet.