Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Build Lite
提交
eab2de20
B
Build Lite
项目概览
OpenHarmony
/
Build Lite
9 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
eab2de20
编写于
11月 14, 2020
作者:
J
jady3356
提交者:
Gitee
11月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add build single target function
上级
506cbf40
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
4 deletion
+16
-4
BUILD.gn
BUILD.gn
+8
-4
compile.py
compile.py
+2
-0
config.ini
config.ini
+2
-0
config.py
config.py
+3
-0
ohos_var.gni
ohos_var.gni
+1
-0
未找到文件。
BUILD.gn
浏览文件 @
eab2de20
...
...
@@ -16,11 +16,15 @@ import("//build/lite/ndk/ndk.gni")
group("ohos") {
deps = []
product_cfg = read_file("//build/lite/product/${product}.json", "json")
foreach(subsystem, product_cfg.subsystem) {
foreach(component, subsystem.component) {
deps += [ component.dir ]
if (ohos_build_target == "") {
product_cfg = read_file("//build/lite/product/${product}.json", "json")
foreach(subsystem, product_cfg.subsystem) {
foreach(component, subsystem.component) {
deps += [ component.dir ]
}
}
} else {
deps += [ ohos_build_target ]
}
}
...
...
compile.py
浏览文件 @
eab2de20
...
...
@@ -27,6 +27,8 @@ def add_options(parser):
parser
.
add_argument
(
'-b'
,
'--build_type'
,
help
=
'release or debug version.'
,
nargs
=
1
,
default
=
[
'release'
])
parser
.
add_argument
(
'-t'
,
'--test'
,
help
=
'Compile test suit'
,
nargs
=
'*'
)
parser
.
add_argument
(
'-T'
,
'--target'
,
help
=
'Compile single target'
,
nargs
=
1
,
default
=
[
''
])
parser
.
add_argument
(
'-n'
,
'--ndk'
,
help
=
'Compile ndk'
,
action
=
'store_true'
)
...
...
config.ini
浏览文件 @
eab2de20
...
...
@@ -18,6 +18,8 @@ test=
test_args
=
ohos_xts_test_args = "%(test)s"
compiler_path
=
compiler_args
=
ohos_build_compiler_dir="%(compiler_path)s"
build_target
=
build_target_args
=
ohos_build_target = "%(build_target)s"
[ndk]
ndk_path
=
...
...
config.py
浏览文件 @
eab2de20
...
...
@@ -32,6 +32,7 @@ class Config():
def
__init__
(
self
,
args
):
self
.
product
=
args
.
product
[
0
]
self
.
build_type
=
args
.
build_type
[
0
]
self
.
build_target
=
args
.
target
[
0
]
self
.
__set_path
()
self
.
config
=
os
.
path
.
join
(
self
.
get_build_path
(),
'config.ini'
)
self
.
log_path
=
os
.
path
.
join
(
self
.
get_out_path
(),
'build.log'
)
...
...
@@ -100,8 +101,10 @@ class Config():
def
get_gn_args
(
self
):
self
.
cfg
.
set
(
'gn_args'
,
'product'
,
self
.
product
)
self
.
cfg
.
set
(
'gn_args'
,
'build_type'
,
self
.
build_type
)
self
.
cfg
.
set
(
'gn_args'
,
'build_target'
,
self
.
build_target
)
self
.
args_list
.
append
(
self
.
cfg
.
get
(
'gn_args'
,
'product_args'
))
self
.
args_list
.
append
(
self
.
cfg
.
get
(
'gn_args'
,
'build_type_args'
))
self
.
args_list
.
append
(
self
.
cfg
.
get
(
'gn_args'
,
'build_target_args'
))
return
" "
.
join
(
self
.
args_list
)
...
...
ohos_var.gni
浏览文件 @
eab2de20
...
...
@@ -15,6 +15,7 @@ declare_args() {
product = ""
# "debug" or "release"
ohos_build_type = "debug"
ohos_build_target = ""
ohos_build_compiler_dir = ""
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录