相关的Issue
#I8FLO7:[新需求]: 使用gn工具的external_deps替代python脚本处理
原因(目的、解决的问题等)
【修改前】
gn在解析加载mindspore部件时,会多线程并行解析third_party/mindspore/BUILD.gn中的mindspore-all和third_party/mindspore/test/BUILD.gn中的mindspore_xxx_test目标。
由于mindspore_xxx_test目标的解析过程需要执行框架层的external_deps_handler.py脚本处理external_deps,相对比较耗时。因此执行完后,mindspore-all里的源码可能大概率已经解压完成。因此,mindspore_xxx_test目标中对third_party/mindspore/mindspore-src/source/mindspore/lite:mindspore_ndk的依赖基本能正常工作。
【gn优化后】
gn优化后,原生支持external_deps,不需要起external_deps_handler.py脚本处理,耗时大大减少。导致在mindspore-all解压完源码前就需要resolve对third_party/mindspore/mindspore-src/source/mindspore/lite:mindspore_ndk的依赖。因此出现以下错误:
ERROR at //third_party/mindspore/test/unittest/BUILD.gn:33:5: Unable to load "/home/handy/qemu/third_party/mindspore/mindspore-src/source/mindspore/lite/BUILD.gn".
"//third_party/mindspore/mindspore-src/source/mindspore/lite:mindspore_ndk",
^--------------------------------------------------------------------------
【修改方案】
mindspore_xxx_test相关目标统一到mindspore-all目标相同的BUILD.gn文件末尾,确保mindspore_xxx_test的解析会在源码解压后,确保时序的一致性。
测试用例(新增、改动、可能影响的功能)
./build.sh --product-name rk3568 --gn-args skip_generate_module_list_file=true可正常编译。
是否需要同步至release(如: monthly_20221018,OpenHarmony-3.2-Beta5 ... )分支?
必须选择一项(在MarkDown模式下用[x]替换[ ]即可勾选对应选项):
- 是,需要同步的分支:
-
否
理由:
是否需要刷新社区文档?
- 是,刷新社区文档pr链接:
- 否