从源代码构建 Android 时如何查看实际的 gcc 选项?
我正在尝试调试我的 android 源构建环境(Android.mk 文件)。默认情况下,make 系统在构建过程中不显示 gcc 命令行。 实现这一点的最佳方法是什么?
I'm trying to debug my android source build environment (Android.mk files). By default the make system does not show the gcc command line during the build process.
What is the best way to enable this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于提出请求的人来说可能为时已晚,但对于其他提出请求的人来说可能已经太晚了。来自 ndk 文档 @ https://docs.google.com/document/ d/1jXxLV866aY9QXWS_9UwLSJjX1I6d1XfBhk1IeEyRgYE/edit?pli=1
ndk-build NDK_DEBUG=1 -->生成可调试的本机代码。
ndk-build V=1 -->启动构建,显示构建命令。
ndk-build -B -->强制完全重建。
ndk-build -BV=1 -->强制完整重建并显示构建
命令。
Probably too late for the asker, but for anyone else who comes along. From the ndk documentation @ https://docs.google.com/document/d/1jXxLV866aY9QXWS_9UwLSJjX1I6d1XfBhk1IeEyRgYE/edit?pli=1
ndk-build NDK_DEBUG=1 --> generate debuggable native code.
ndk-build V=1 --> launch build, displaying build commands.
ndk-build -B --> force a complete rebuild.
ndk-build -B V=1 --> force a complete rebuild and display build
commands.
showcommands make 目标将显示 gcc/g++ 命令行:
更多信息和其他 Android.mk 构建块位于此处:http://elinux.org/Android_Build_System
如果您使用 mm 进行构建:
The showcommands make target will display the gcc/g++ command line:
More info and other Android.mk build nuggets here: http://elinux.org/Android_Build_System
If you are building with mm:
我在此链接中找到了非常详细的文档:http://hashspeaks。 wordpress.com/2010/01/27/android-mk-documentation/
所以你应该能够将 -v -Wall 添加到 LOCAL_CPPFLAGS
I found a very detailed documentation in this link: http://hashspeaks.wordpress.com/2010/01/27/android-mk-documentation/
so you should be able to add -v -Wall to LOCAL_CPPFLAGS