我正在寻找有关 APP_OPTIM := release
究竟如何优化代码的详细信息(例如,它可能使用什么 cflags),我遇到了上一个问题:How does APP_OPTIM manifest in code?
但是,当我在我的 ndk 目录中搜索 add-application.mk 文件时,我注意到我没有看到相同的代码,相反,我有类似的东西:
ifneq ($(APP_OPTIM),)
# check that APP_OPTIM, if defined, is either 'release' or 'debug'
$(if $(filter-out release debug,$(APP_OPTIM)),\
$(call __ndk_info, The APP_OPTIM defined in $(_application_mk) must only be 'release' or 'debug')\
$(call __ndk_error,Aborting)\
)
$(call ndk_log,Selecting optimization mode through Application.mk: $(APP_OPTIM))
else
特别是,我不知道 $(call ndk_log,Selecting optimization mode through Application.mk: $(APP_OPTIM))
在做什么。
任何人都可以指导我正确的方向,找出 APP_OPTIM 使用的优化类型吗?也许我的 ndk (r8e) 已经移动了那个代码块,但我不确定在哪里可以找到它。
谢谢
最佳答案
您应该使用参数 V=1
运行 ndk-build
以准确查看它发出的编译和链接命令。自己对比debug和release。
关于android - APP_OPTIM := release use?做了哪些优化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16817620/