"""
接收参数列表及解释:
-c:
clean后编译
-j:
-j<num>, 以num线程数编译
默认为机器最大线程数
-def=:
-def=XXX,YYY,ZZZ=x,... 向本次编译target中添加XXX、YYY、ZZZ=x编译宏
可使用-def=-:XXX 来屏蔽XXX宏
可使用-def=-:ZZZ=x 来添加或者修改ZZZ宏
-component=:
-component=XXX,YYY,... 仅编译XXX,YYY组件
-ninja:
使用ninja生成中间文件
默认使用Unix makefile
-[release/debug]:
debug: 在生成反汇编文件时信息更加全面但也更耗时
release: 在生成反汇编文件时节省时间
默认为debug
-dump:
输出target的编译参数
-nhso:
不更新HSO数据库
-nparse:
不生成全内存解析所需文件
-out_libs:
-out_libs=file_path, 不再链接成elf, 转而将所有.a打包成一个大的.a
others:
作为匹配编译target_names的关键字
"""
import os
import sys
sys.dont_write_bytecode = True
root_dir = os.path.split(os.path.realpath(__file__))[0]
sys.path.insert(0, os.path.join(root_dir, 'build', 'config'))
sys.path.insert(0, os.path.join(root_dir, 'build', 'script'))
from cmake_builder import CMakeBuilder
builder = CMakeBuilder(sys.argv)
builder.build()