Generation of options.txt by a custom toolchain


(Paweł Maszota) #1

Hi everyone.
I have the task of porting an embedded C project in Keil uVision from make to gradle. This required to configure my own toolchain for armcc (of type Gcc). I however noticed that the only txt file generated in the build directory is the output.txt. There is no options.txt.

I made a simple test writing a basic C project and compiling it with MinGW and armcc. The former outputs both output.txt and options.txt. The latter however outputs only output.txt.

My question is how does gradle decide whether it should or should not create an options.txt file in the build output. Can I somehow force gradle to generate the options.txt file?

Thanks in advance for your replies!


(Sterling Greene) #2

We probe gcc to figure out which version it is: https://github.com/gradle/gradle/blob/master/subprojects/platform-native/src/main/groovy/org/gradle/nativeplatform/toolchain/internal/gcc/version/GccVersionDeterminer.java#L133

I’m guessing your armcc tool chain appears to be GCC 3.x


(Paweł Maszota) #3

So If I understand correctly the options.txt is a gradle-side feature which depends on the version of GCC, correct?


(Sterling Greene) #4

Yes, GCC 3.x (and other tools) don’t support argfiles, so we don’t generate them for those things.