Files
kunlun/BUILD.gn

46 lines
776 B
Plaintext

import("//build/buildcfg.gni")
exe_bin="ht"
module_name = get_path_info(rebase_path("."), "name")
executable(exe_bin){
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,
"-Wl,--gc-sections",# 移除未使用的段 可以解决一些函数未定义问题
"-Wall",
"-Wextra",
"-nostartfiles",
"-Wl,-Map,${exe_bin}.map",
]
output_name = exe_bin
output_extension = "elf"
deps=[":$module_name"]
}
module_group(module_name) {
modules = [
"ap",
"app",
"startup",
"driver",
"common",
"os",
"plc",
# "ftm",
"pib",
"cli",
# "import"
]
}