# ohos_tips **Repository Path**: huanghuijin/tips ## Basic Information - **Project Name**: ohos_tips - **Description**: 记录一些ohos的tips - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-07-05 - **Last Updated**: 2025-06-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ohos_tips #### 介绍 本仓库主要用来存放一些OHOS的使用技巧,不能保证一定有效 #### ohos clang版本编译 详细请参考https://gitee.com/liwentao_uiw/third_party_llvm-project/tree/llvmorg-12.0.1-dev-oh/llvm-build 0. 构建环境准备 ``` sudo apt-get install build-essential swig python3-dev libedit-dev libncurses5-dev binutils-dev sudo apt-get install lld-10; ln -s /usr/bin/ld.lld-10 /usr/bin/ld; ln -s /usr/bin/ld.lld-10 /usr/bin/ld.lld sudo apt-get install libtinfo5 ``` 1. 下载构建需要的全部代码仓 ``` repo init -u https://gitee.com/liwentao_uiw/manifest.git -b add_llvm_toolchain-dev --no-repo-verify repo sync -c repo forall -c 'git lfs pull' ``` 2. 下载完成以后,执行以下脚本 ``` cp -r toolchain/llvm-project/llvm-build toolchain ./toolchain/llvm-project/llvm-build/env_prepare.sh python3 toolchain/llvm-build/build.py ``` #### commit message/PR 要求 ref: https://cbea.ms/git-commit/ ``` 标题(必选):一句话描述当前修改的目的,如 Fix xxx / Implement xxx等 空行 描述 ( 可选 ) :具体修改原因/方案/背景等, 可以补充相关性能&内存数据 空行 Issue: Gitee Issue号 测试 ( 可选 ) :描述这个修改涉及的测试用例/测试方法 ``` 备注: 标题 控制在< 50 字符以内(将会在git log --oneline中显示) 标题 尾部 不需要 加句号 标题 使用 祈使句 各段落间增加 空行 描述具What & Why 而不是 How 各段落首字母 大写 Issue 跟 Test中间不需要空行,最多三段 示例: ``` 绑定的issue 原因(目的,解决的问题等) 描述(做了什么,变更了什么) 测试用例(新增、改动、可能影响的功能) ``` ####