如何强制gradle打印或记录所有已执行的编译器命令? [英] How do you force gradle to print or log all compiler commands executed?
本文介绍了如何强制gradle打印或记录所有已执行的编译器命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图查看gradle在执行所有构建任务期间使用的确切编译器命令(在我的情况下为gcc).使用--debug
运行不会输出这些命令,并且build/tmp中的输出文件也没有这些命令.我目前正在使用Gradle 2.6
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
推荐答案
请参见$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
包含传递给编译器/链接器等的选项,而output.txt
包含编译器/链接器的输出.
options.txt
contains the options passed to the compiler/linker etc, and output.txt
contains the output of the compiler/linker.
这篇关于如何强制gradle打印或记录所有已执行的编译器命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文