diff --git a/BUILD.gn b/BUILD.gn index bf097683..ea4fd925 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -44,6 +44,10 @@ if (defined(LOSCFG_COMPILER_ICCARM)) { } } +declare_args() { + liteos_build_asm = true +} + config("arch_config") { cflags = arch_config_cflags asmflags = arch_config_asmflags @@ -215,4 +219,7 @@ build_ext_component("build_kernel_image") { exec_path = rebase_path(root_out_dir) command = toochain_config_command + if (liteos_build_asm) { + command += toochain_asm_command + } } diff --git a/config.gni b/config.gni index f99bfb92..5aa941d3 100644 --- a/config.gni +++ b/config.gni @@ -206,5 +206,6 @@ 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 += + +toochain_asm_command = " && sh -c '$toochain_config_objdump -d $liteos_name >$liteos_name.asm'" diff --git a/config_iccarm.gni b/config_iccarm.gni index 125afcc6..69ebd159 100644 --- a/config_iccarm.gni +++ b/config_iccarm.gni @@ -149,4 +149,5 @@ 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'" + +toochain_asm_command = " && sh -c '$toochain_config_objdump --source --all $liteos_name -o $liteos_name.asm'"