成功使用ninja编译ht.bin
This commit is contained in:
13
BUILD.gn
13
BUILD.gn
@@ -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"]
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user