Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos M
提交
0c8b7d2a
K
Kernel Liteos M
项目概览
OpenHarmony
/
Kernel Liteos M
大约 1 年 前同步成功
通知
20
Star
28
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos M
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0c8b7d2a
编写于
7月 12, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
!751 refactor:编译框架对不同工具链的解耦优化
Merge pull request !751 from Zhaotianyu/20220712buildframework_opt
上级
39839d31
009d2503
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
36 addition
and
30 deletion
+36
-30
BUILD.gn
BUILD.gn
+2
-30
config.gni
config.gni
+20
-0
config_iccarm.gni
config_iccarm.gni
+14
-0
未找到文件。
BUILD.gn
浏览文件 @
0c8b7d2a
...
@@ -31,11 +31,6 @@ import("//build/lite/config/component/lite_component.gni")
...
@@ -31,11 +31,6 @@ import("//build/lite/config/component/lite_component.gni")
LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h")
LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h")
declare_args() {
liteos_name = "OHOS_Image"
liteos_kernel_only = false
}
import("liteos.gni")
import("liteos.gni")
if (defined(LOSCFG_COMPILER_ICCARM)) {
if (defined(LOSCFG_COMPILER_ICCARM)) {
...
@@ -194,15 +189,7 @@ executable("liteos") {
...
@@ -194,15 +189,7 @@ executable("liteos") {
":los_config",
":los_config",
]
]
if (defined(LOSCFG_COMPILER_ICCARM)) {
ldflags = executable_config_ldflags
ldflags = [ "--map=$liteos_name.map" ]
} else {
ldflags = [
"-static",
"-Wl,--gc-sections",
"-Wl,-Map=$liteos_name.map",
]
}
output_dir = target_out_dir
output_dir = target_out_dir
...
@@ -223,20 +210,5 @@ build_ext_component("build_kernel_image") {
...
@@ -223,20 +210,5 @@ build_ext_component("build_kernel_image") {
deps = [ ":copy_liteos" ]
deps = [ ":copy_liteos" ]
exec_path = rebase_path(root_out_dir)
exec_path = rebase_path(root_out_dir)
if (defined(LOSCFG_COMPILER_ICCARM)) {
command = toochain_config_command
objcopy = "${compile_prefix}ielftool$toolchain_cmd_suffix"
objdump = "${compile_prefix}ielfdumparm$toolchain_cmd_suffix"
command = "$objcopy --bin --verbose $liteos_name $liteos_name.bin"
command +=
" && sh -c '$objdump --source --all $liteos_name -o $liteos_name.asm'"
} else {
objcopy = "${compile_prefix}objcopy$toolchain_cmd_suffix"
objdump = "${compile_prefix}objdump$toolchain_cmd_suffix"
command = "$objcopy -O binary $liteos_name $liteos_name.bin"
command +=
" && sh -c '$objdump -t $liteos_name | sort >$liteos_name.sym.sorted'"
command += " && sh -c '$objdump -d $liteos_name >$liteos_name.asm'"
}
}
}
config.gni
浏览文件 @
0c8b7d2a
...
@@ -31,6 +31,9 @@ import("liteos.gni")
...
@@ -31,6 +31,9 @@ import("liteos.gni")
LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h")
LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h")
liteos_name = "OHOS_Image"
liteos_kernel_only = false
#
#
# arch_config
# arch_config
#
#
...
@@ -188,3 +191,20 @@ if (!defined(LOSCFG_COMPILER_CLANG_LLVM)) {
...
@@ -188,3 +191,20 @@ if (!defined(LOSCFG_COMPILER_CLANG_LLVM)) {
}
}
misc_config_asmflags += misc_config_cflags
misc_config_asmflags += misc_config_cflags
misc_config_asmflags += [ "-DCLZ=CLZ" ]
misc_config_asmflags += [ "-DCLZ=CLZ" ]
# ldflags for generating executable bin files
executable_config_ldflags = [
"-static",
"-Wl,--gc-sections",
"-Wl,-Map=$liteos_name.map",
]
# Commands to generate kernel_image
toochain_config_objcopy = "${compile_prefix}objcopy$toolchain_cmd_suffix"
toochain_config_objdump = "${compile_prefix}objdump$toolchain_cmd_suffix"
toochain_config_command =
"$toochain_config_objcopy -O binary $liteos_name $liteos_name.bin"
toochain_config_command += " && sh -c '$toochain_config_objdump -t $liteos_name | sort >$liteos_name.sym.sorted'"
toochain_config_command +=
" && sh -c '$toochain_config_objdump -d $liteos_name >$liteos_name.asm'"
config_iccarm.gni
浏览文件 @
0c8b7d2a
...
@@ -31,6 +31,9 @@ import("liteos.gni")
...
@@ -31,6 +31,9 @@ import("liteos.gni")
LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h")
LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h")
liteos_name = "OHOS_Image"
liteos_kernel_only = false
#
#
# arch_config
# arch_config
#
#
...
@@ -138,3 +141,14 @@ misc_config_cflags = []
...
@@ -138,3 +141,14 @@ misc_config_cflags = []
misc_config_asmflags = []
misc_config_asmflags = []
misc_config_asmflags += [ "-DCLZ=CLZ" ]
misc_config_asmflags += [ "-DCLZ=CLZ" ]
# ldflags for generating executable bin files
executable_config_ldflags = [ "--map=$liteos_name.map" ]
# Commands to generate kernel_image
toochain_config_objcopy = "${compile_prefix}ielftool$toolchain_cmd_suffix"
toochain_config_objdump = "${compile_prefix}ielfdumparm$toolchain_cmd_suffix"
toochain_config_command =
"$toochain_config_objcopy --bin --verbose $liteos_name $liteos_name.bin"
toochain_config_command += " && sh -c '$toochain_config_objdump --source --all $liteos_name -o $liteos_name.asm'"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录