Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Build Lite
提交
674ae22d
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 搜索 >>
提交
674ae22d
编写于
7月 22, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 22, 2021
浏览文件
操作
浏览文件
下载
差异文件
!204 从Make编译切换到GN编译
Merge pull request !204 from Caoruihong/build_gn
上级
3f842511
84d97095
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
8 deletion
+41
-8
config/BUILD.gn
config/BUILD.gn
+5
-0
config/BUILDCONFIG.gn
config/BUILDCONFIG.gn
+9
-8
run_shell_cmd.py
run_shell_cmd.py
+27
-0
未找到文件。
config/BUILD.gn
浏览文件 @
674ae22d
...
...
@@ -15,6 +15,7 @@ config("cpu_arch") {
cflags = target_arch_cflags
cflags_cc = cflags
ldflags = cflags
asmflags = cflags
}
config("language_c") {
...
...
@@ -113,6 +114,10 @@ config("ohos_clang") {
"__BUILD_LINUX_WITH_CLANG",
]
}
ldflags = [
"-fuse-ld=lld",
"--rtlib=compiler-rt",
]
}
config("release") {
...
...
config/BUILDCONFIG.gn
浏览文件 @
674ae22d
...
...
@@ -76,9 +76,10 @@ if (board_toolchain != "" && use_board_toolchain) {
} else if (board_toolchain_type == "clang") {
ohos_current_cc_command = "${compile_prefix}clang$toolchain_cmd_suffix"
ohos_current_cxx_command = "${compile_prefix}clang++$toolchain_cmd_suffix"
ohos_current_ar_command = "${compile_prefix}llvm-ar$toolchain_cmd_suffix"
compile_prefix += "llvm-"
ohos_current_ar_command = "${compile_prefix}ar$toolchain_cmd_suffix"
ohos_current_ld_command = ohos_current_cc_command
ohos_current_strip_command = "$
compile_prefix/llvm-
objcopy$toolchain_cmd_suffix --strip-all"
ohos_current_strip_command = "$
{compile_prefix}
objcopy$toolchain_cmd_suffix --strip-all"
default_target_configs = [ "//build/lite/config:clang_opt" ]
}
# Overwrite ld cmd by customed cmd.
...
...
@@ -89,13 +90,13 @@ if (board_toolchain != "" && use_board_toolchain) {
# OHOS default toolchain
ohos_build_compiler = "clang"
ohos_clang_toolchain_dir = rebase_path("${ohos_build_compiler_dir}/bin")
compile_prefix += rebase_path("${ohos_build_compiler_dir}/bin")
ohos_current_cc_command = "${compile_prefix}/clang$toolchain_cmd_suffix"
ohos_current_cxx_command = "${compile_prefix}/clang++$toolchain_cmd_suffix"
ohos_current_ar_command = "${compile_prefix}/llvm-ar$toolchain_cmd_suffix"
compile_prefix += "$ohos_clang_toolchain_dir/"
ohos_current_cc_command = "${compile_prefix}clang$toolchain_cmd_suffix"
ohos_current_cxx_command = "${compile_prefix}clang++$toolchain_cmd_suffix"
compile_prefix += "llvm-"
ohos_current_ar_command = "${compile_prefix}ar$toolchain_cmd_suffix"
ohos_current_ld_command = ohos_current_cxx_command
ohos_current_strip_command =
"$ohos_clang_toolchain_dir/llvm-objcopy$toolchain_cmd_suffix --strip-all"
ohos_current_strip_command = "${compile_prefix}objcopy$toolchain_cmd_suffix --strip-all"
set_default_toolchain("//build/lite/toolchain:linux_x86_64_ohos_clang")
default_target_configs = [ "//build/lite/config:ohos_clang" ]
default_target_configs += [ "//build/lite/config:clang_opt" ]
...
...
run_shell_cmd.py
0 → 100755
浏览文件 @
674ae22d
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import
os
import
sys
def
main
():
return
os
.
WEXITSTATUS
(
os
.
system
(
' '
.
join
(
sys
.
argv
[
1
:])))
if
__name__
==
'__main__'
:
sys
.
exit
(
main
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录