本文介绍了gcc -save-temps:如何指定目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以指定 -save-temps
工件?
Is it possible to specify the output directory of the -save-temps
artifacts?
我知道以后我可以做 mv
,但是想知道是否有一种避免多余步骤的方法.
I know I can do a mv
afterwards but wondering if there's a way to avoid the extra step.
推荐答案
您可以指定 -save-temps
工件将通过以下任一方式保存在编译的当前目录中:-
You can specify that the -save-temps
artifacts will be saved in current directory of the compilation with either of:-
-save-temps
-save-temps=cwd
或者您可以指定它们将与相应的 .o
文件保存在同一目录中,前提是还使用了 -o
选项,
Or you can specify that they will be saved in the same directory as the corresponding .o
files,provided that the -o
option is also used, with:
-save-temps=obj
这些是您唯一的选择.这是文档
Those are your only options. Here is the documentation
这篇关于gcc -save-temps:如何指定目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!