# gn_helper_ohos **Repository Path**: cctom/gn_helper_ohos ## Basic Information - **Project Name**: gn_helper_ohos - **Description**: GN Helper (for OHOS build) - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2021-11-21 - **Last Updated**: 2024-04-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gn_helper_ohos #### 介绍 GN Helper (for OHOS build) Print GN dependency information from a dependency tree stored in a file. #### 使用说明 Enable the check_deps arg when running hb build (eg. hb build --build-only-gn --gn-args check_deps=true) to generate the files documenting OpenHarmony dependencies. Then write the output of a GN deps --tree to a file and specify the file with the --cache option when running gn_helper (defaults to deptree.cache in the out_dir). eg: `gn desc out/rk3568 //build/core/gn:images deps --tree > out/rk3568/deptree.cache` The commands which are the same as GN use the same command line as GN. eg: `gn_helper.py desc out/rk3568 //build/ohos/images:make_images deps --tree` gn_helper_ohos understands OHOS type descriptions \:\ and \:\ and I added some options. eg: `gn_helper.py desc out/rk3568 time:time_service deps --all --type external --reverse-external-deps` Prints all the external dependencies of time:time_service in \:\ format. `gn_helper.py desc out/rk3568 time:time_service deps --skip-suffix __notice --tree --leading-to image_framework:image --reverse-external-deps` Prints a dependency tree from time:time_service for all deps not ending with __notice leading to image_framework:image Notes: --leading-to can be used to see paths from one target to another (easier to implement than path). --skip-suffix, when used with --tree, excludes everything under a target with the specified suffix from the tree. --type doesn't do anything when used with --tree