Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Build Lite
提交
8a00d4bc
B
Build Lite
项目概览
OpenHarmony
/
Build Lite
大约 1 年 前同步成功
通知
22
Star
24
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Build Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8a00d4bc
编写于
7月 01, 2021
作者:
P
pilipala195
提交者:
Gitee
7月 01, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hb build supports --gn-args parameters
上级
51ecd13a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
13 addition
and
0 deletion
+13
-0
hb/build/build.py
hb/build/build.py
+12
-0
hb/build/build_process.py
hb/build/build_process.py
+1
-0
未找到文件。
hb/build/build.py
浏览文件 @
8a00d4bc
...
...
@@ -21,6 +21,7 @@ from collections import defaultdict
from
hb.build.build_process
import
Build
from
hb.set.set
import
set_product
from
hb.common.utils
import
get_current_time
from
hb.common.utils
import
OHOSException
def
add_options
(
parser
):
...
...
@@ -51,6 +52,9 @@ def add_options(parser):
help
=
'sign haps by server'
,
action
=
'store_true'
)
parser
.
add_argument
(
'--patch'
,
help
=
'apply product patch before compiling'
,
action
=
'store_true'
)
parser
.
add_argument
(
'--gn-args'
,
nargs
=
1
,
default
=
''
,
help
=
'specifies gn build arguments, '
'eg: --gn-args="foo="bar" enable=true blah=7"'
)
def
exec_command
(
args
):
...
...
@@ -98,4 +102,12 @@ def exec_command(args):
'true'
,
quota
=
False
)
if
len
(
args
.
gn_args
):
for
gn_arg
in
args
.
gn_args
[
0
].
split
(
' '
):
try
:
variable
,
value
=
gn_arg
.
split
(
'='
)
build
.
register_args
(
variable
,
value
)
except
ValueError
:
raise
OHOSException
(
f
'Invalid gn args:
{
gn_arg
}
'
)
return
build
.
build
(
args
.
full
,
patch
=
args
.
patch
,
cmd_args
=
cmd_args
)
hb/build/build_process.py
浏览文件 @
8a00d4bc
...
...
@@ -103,6 +103,7 @@ class Build():
raise
OHOSException
(
'Error: wrong input of test'
)
def
register_args
(
self
,
args_name
,
args_value
,
quota
=
True
):
quota
=
False
if
args_value
in
[
'true'
,
'false'
]
else
quota
if
quota
:
if
isinstance
(
args_value
,
list
):
self
.
_args_list
+=
[
'{}="{}"'
.
format
(
args_name
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录