提交 a4527882 编写于 作者: C Caoruihong

feat: use strip instead of objcopy as toolchain's strip

this makes gcc and clang toolchain's strip have the same
usages.
Signed-off-by: NCaoruihong <crh.cao@huawei.com>
Change-Id: I5fe640d3383223147694aa90776b586bd99e2f07
上级 d40a5f1f
......@@ -79,7 +79,7 @@ if (board_toolchain != "" && use_board_toolchain) {
compile_prefix += "llvm-"
ohos_current_ar_command = "${compile_prefix}ar$toolchain_cmd_suffix"
ohos_current_ld_command = ohos_current_cc_command
ohos_current_strip_command = "${compile_prefix}objcopy$toolchain_cmd_suffix --strip-all"
ohos_current_strip_command = "${compile_prefix}strip$toolchain_cmd_suffix --strip-unneeded"
default_target_configs = [ "//build/lite/config:clang_opt" ]
}
# Overwrite ld cmd by customed cmd.
......@@ -96,7 +96,7 @@ if (board_toolchain != "" && use_board_toolchain) {
compile_prefix += "llvm-"
ohos_current_ar_command = "${compile_prefix}ar$toolchain_cmd_suffix"
ohos_current_ld_command = ohos_current_cxx_command
ohos_current_strip_command = "${compile_prefix}objcopy$toolchain_cmd_suffix --strip-all"
ohos_current_strip_command = "${compile_prefix}strip$toolchain_cmd_suffix --strip-unneeded"
set_default_toolchain("//build/lite/toolchain:linux_x86_64_ohos_clang")
default_target_configs = [ "//build/lite/config:ohos_clang" ]
default_target_configs += [ "//build/lite/config:clang_opt" ]
......
......@@ -73,7 +73,7 @@ template("clang_toolchain") {
command += "$ld -shared {{ldflags}} {{inputs}} {{libs}} -o $unstripped_outfile"
if (need_strip) {
command += " && $strip \"$unstripped_outfile\" \"$outfile\""
command += " && $strip \"$unstripped_outfile\" -o \"$outfile\""
}
default_output_extension = ".so"
......@@ -98,7 +98,7 @@ template("clang_toolchain") {
command +=
"$ld {{ldflags}} {{inputs}} {{libs}} $custom_ld_flags -o $unstripped_outfile"
if (need_strip) {
command += " && $strip \"$unstripped_outfile\" \"$outfile\""
command += " && $strip \"$unstripped_outfile\" -o \"$outfile\""
}
description = "LLVM LINK $outfile"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册