I'm trying to see the exact compiler commands (in my case gcc) used by gradle during execution of all build tasks. Running with --debug
doesn't output these commands, and output files in build/tmp don't have them either. I'm currently using Gradle 2.6
See $projectDir/build/tmp
You should have a folder structure that looks something like:
├───compileMainSharedLibraryMainCpp
│ options.txt
│ output.txt
│
├───compileMainStaticLibraryMainCpp
│ options.txt
│ output.txt
│
├───createMainStaticLibrary
│ options.txt
│ output.txt
│
└───linkMainSharedLibrary
options.txt
output.txt
options.txt
contains the options passed to the compiler/linker etc, and output.txt
contains the output of the compiler/linker.
The following snippet in build.gradle prints options (not complete command line):
toolChains {
gcc(Gcc) {
eachPlatform {
cppCompiler.withArguments { args ->
println "----> C++ args: " + args
}
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With