Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Build Lite
提交
bf350c4f
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,发现更多精彩内容 >>
未验证
提交
bf350c4f
编写于
9月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!565 skip some post build process
Merge pull request !565 from lubinglun/skip_some_post_build_process
上级
b94bded1
c674c311
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
7 deletion
+25
-7
hb_internal/build/build.py
hb_internal/build/build.py
+8
-0
hb_internal/build/build_process.py
hb_internal/build/build_process.py
+8
-2
hb_internal/common/misc.py
hb_internal/common/misc.py
+9
-5
未找到文件。
hb_internal/build/build.py
浏览文件 @
bf350c4f
...
...
@@ -118,6 +118,12 @@ def add_options(parser):
default
=
False
,
help
=
'it will skip post build process, '
'you can enable it if you do not need post build'
)
parser
.
add_argument
(
'--disable-part-of-post-build'
,
default
=
[],
nargs
=
'*'
,
help
=
'it will skip part of post build process, which includes output_part_rom_status, stat_ccache, generate_ninja_trace, get_warning_list, compute_overlap_rate. '
'you can choose which subprocess to skip by passing in parameters. '
'eg:--disable-part-of-post-build output_part_rom_status --disable-part-of-post-build stat_ccache'
)
parser
.
add_argument
(
'--device-type'
,
help
=
'specifies device type'
,
default
=
'default'
)
...
...
@@ -211,6 +217,8 @@ def exec_command(args):
cmd_args
[
'disable_package_image'
]
=
args
.
disable_package_image
if
args
.
disable_post_build
:
cmd_args
[
'disable_post_build'
]
=
args
.
disable_post_build
if
args
.
disable_part_of_post_build
:
cmd_args
[
'disable_part_of_post_build'
]
=
args
.
disable_part_of_post_build
if
hasattr
(
args
,
'device_type'
)
and
args
.
device_type
:
cmd_args
[
'device_type'
]
=
args
.
device_type
if
hasattr
(
args
,
'build_variant'
)
and
args
.
build_variant
:
...
...
hb_internal/build/build_process.py
浏览文件 @
bf350c4f
...
...
@@ -144,6 +144,11 @@ class Build():
if
cmd_args
is
None
:
cmd_args
=
defaultdict
(
list
)
if
cmd_args
.
get
(
'disable_part_of_post_build'
):
disable_post_build_args
=
cmd_args
[
'disable_part_of_post_build'
]
else
:
disable_post_build_args
=
[]
try
:
for
exec_cmd
in
cmd_list
:
exec_cmd
(
cmd_args
)
...
...
@@ -157,12 +162,13 @@ class Build():
post_build
.
patch_ohos_para
(
cmd_args
)
if
not
cmd_args
.
get
(
'disable_package_image'
):
post_build
.
package_image
()
output_part_rom_status
(
self
.
config
.
root_path
)
if
not
disable_post_build_args
or
'output_part_rom_status'
not
in
disable_post_build_args
:
output_part_rom_status
(
self
.
config
.
root_path
)
finally
:
if
not
cmd_args
.
get
(
'disable_post_build'
):
if
'post_build'
not
in
locals
():
post_build
=
PostBuild
(
self
.
config
)
post_build
.
clean
(
self
.
start_time
)
post_build
.
clean
(
self
.
start_time
,
disable_post_build_args
)
hb_info
(
f
'
{
os
.
path
.
basename
(
self
.
config
.
out_path
)
}
build success'
)
hb_info
(
f
'cost time:
{
self
.
build_time
}
'
)
...
...
hb_internal/common/misc.py
浏览文件 @
bf350c4f
...
...
@@ -99,11 +99,15 @@ class PostBuild:
self
.
_out_path
=
config
.
out_path
self
.
_log_path
=
config
.
log_path
def
clean
(
self
,
start_time
):
self
.
stat_ccache
()
self
.
generate_ninja_trace
(
start_time
)
self
.
get_warning_list
()
self
.
compute_overlap_rate
()
def
clean
(
self
,
start_time
,
disable_post_build_args
):
if
not
disable_post_build_args
or
'stat_ccache'
not
in
disable_post_build_args
:
self
.
stat_ccache
()
if
not
disable_post_build_args
or
'generate_ninja_trace'
not
in
disable_post_build_args
:
self
.
generate_ninja_trace
(
start_time
)
if
not
disable_post_build_args
or
'get_warning_list'
not
in
disable_post_build_args
:
self
.
get_warning_list
()
if
not
disable_post_build_args
or
'compute_overlap_rate'
not
in
disable_post_build_args
:
self
.
compute_overlap_rate
()
def
patch_ohos_para
(
self
,
cmd_args
):
ohos_para_data
=
[]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录