Files
kunlun/BUILD.gn

46 lines
774 B
Plaintext
Raw Permalink Normal View History

import("//build/buildcfg.gni")
2025-01-16 19:52:28 +08:00
2025-01-17 16:35:20 +08:00
exe_bin="ht"
2025-01-16 19:52:28 +08:00
module_name = get_path_info(rebase_path("."), "name")
2025-01-16 19:52:28 +08:00
2025-01-17 16:35:20 +08:00
executable(exe_bin){
2025-01-17 11:09:30 +08:00
link_path=rebase_path("${kl_ld_script}")
link_file=get_path_info(link_path,"file")
link_dir=get_path_info(link_path,"dir")
ldflags=[
"-Wl,-T" + link_file,
"-Wl,-u_printf_float",
"-L" + link_dir,
2025-01-17 16:35:20 +08:00
"-Wl,--gc-sections",# 移除未使用的段 可以解决一些函数未定义问题
"-Wall",
"-Wextra",
"-nostartfiles",
"-Wl,-Map,${exe_bin}.map",
2025-01-17 11:09:30 +08:00
]
2025-01-17 16:35:20 +08:00
output_name = exe_bin
output_extension = "elf"
deps=[":$module_name"]
2025-01-16 19:52:28 +08:00
}
module_group(module_name) {
modules = [
"ap",
"app",
"startup",
"driver",
"common",
"os",
"plc",
2025-01-20 15:11:32 +08:00
"ftm",
"pib",
"cli",
# "import"
]
}