成功使用ninja编译ht.bin

This commit is contained in:
2025-01-17 16:35:20 +08:00
parent de211907a4
commit 2cb352f92c
11 changed files with 458 additions and 225 deletions

View File

@@ -5,12 +5,11 @@ import("//build/buildcfg.gni")
exe_bin="ht"
module_name = get_path_info(rebase_path("."), "name")
executable("kunlun.out"){
deps=[":$module_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")
@@ -18,7 +17,15 @@ executable("kunlun.out"){
"-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"]
}