Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Build Lite
提交
d950e490
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,发现更多精彩内容 >>
提交
d950e490
编写于
4月 09, 2021
作者:
O
openharmony_ci
提交者:
Gitee
4月 09, 2021
浏览文件
操作
浏览文件
下载
差异文件
!78 【轻量级 PR】:ohos-build bugfix
Merge pull request !78 from pilipala195/N/A
上级
175e4d01
115d7e69
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
4 deletion
+20
-4
hb/build/build.py
hb/build/build.py
+3
-3
hb/build/build_process.py
hb/build/build_process.py
+2
-1
hb/common/device.py
hb/common/device.py
+15
-0
未找到文件。
hb/build/build.py
浏览文件 @
d950e490
...
...
@@ -20,6 +20,7 @@ from collections import defaultdict
from
hb.build.build_process
import
Build
from
hb.set.set
import
set_product
from
hb.common.device
import
Device
def
add_options
(
parser
):
...
...
@@ -57,9 +58,6 @@ def exec_command(args):
build
.
register_args
(
'ohos_build_type'
,
args
.
build_type
[
0
])
if
len
(
args
.
compiler
):
build
.
compiler
=
args
.
compiler
[
0
]
if
args
.
test
is
not
None
:
build
.
test
=
args
.
test
...
...
@@ -72,6 +70,8 @@ def exec_command(args):
product
,
company
=
args
.
product
[
0
].
split
(
'@'
)
set_product
(
product_name
=
product
,
company
=
company
)
build
.
compiler
=
Device
.
get_compiler
(
build
.
config
.
device_path
)
if
args
.
ndk
:
build
.
register_args
(
'ohos_build_ndk'
,
'true'
,
quota
=
False
)
...
...
hb/build/build_process.py
浏览文件 @
d950e490
...
...
@@ -17,6 +17,7 @@
#
import
os
import
sys
from
collections
import
defaultdict
from
hb.common.utils
import
exec_command
...
...
@@ -141,7 +142,7 @@ class Build():
self
.
config
.
out_path
,
'--root={}'
.
format
(
self
.
config
.
root_path
),
'--dotfile={}/.gn'
.
format
(
self
.
config
.
build_path
),
'--script-executable=python3
'
,
f
'--script-executable=
{
sys
.
executable
}
'
,
'--args={}'
.
format
(
" "
.
join
(
self
.
_args_list
))]
+
gn_args
exec_command
(
gn_cmd
,
log_path
=
self
.
config
.
log_path
)
...
...
hb/common/device.py
浏览文件 @
d950e490
...
...
@@ -109,3 +109,18 @@ class Device():
if
os
.
path
.
isdir
(
path
)
or
os
.
path
.
isfile
(
path
):
return
raise
Exception
(
'invalid path: {}'
.
format
(
path
))
@
staticmethod
def
get_compiler
(
config_path
):
config
=
os
.
path
.
join
(
config_path
,
'config.gni'
)
if
not
os
.
path
.
isfile
(
config
):
return
''
compiler_pattern
=
r
'board_toolchain_type ?= ?"(\w+)"'
with
open
(
config
,
'rt'
,
encoding
=
'utf-8'
)
as
config_file
:
data
=
config_file
.
read
()
compiler_list
=
re
.
findall
(
compiler_pattern
,
data
)
if
not
len
(
compiler_list
):
raise
Exception
(
'board_toolchain_type is None'
' in {}'
.
format
(
config
))
return
compiler_list
[
0
]
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录