随着5.1 release的发布,更新了很多新的编译规则,而且官方的文档并未及时更新相关文档进行说明
1.不同模块之间的头文件,不能允许直接引用
调alsa的时候,打开drivers_peripheral_audio_feature_alsa_lib
特性,会直接报错
1.1 分析过程
看报错提示Please use 'external_deps/public_external_deps' dependent module. 去全局搜索这段log,
定位到third_party/gn/src/gn/ohos_components_checker.cc的InterceptIncludesAbsoluteDepsOther函数
1.2 解决办法
可知当//device/board/hihope/rk3568/audio_alsa和//third_party/alsa-lib/include在deps_includes_absolute字段时,返回true。所以修改、build/component_compilation_whitelist.json文件