提交 6ea22b3b 编写于 作者: O openharmony_ci 提交者: Gitee

!212 统一gcc和clang的strip工具

Merge pull request !212 from Caoruihong/gn_build_apps
...@@ -79,7 +79,7 @@ if (board_toolchain != "" && use_board_toolchain) { ...@@ -79,7 +79,7 @@ if (board_toolchain != "" && use_board_toolchain) {
compile_prefix += "llvm-" compile_prefix += "llvm-"
ohos_current_ar_command = "${compile_prefix}ar$toolchain_cmd_suffix" ohos_current_ar_command = "${compile_prefix}ar$toolchain_cmd_suffix"
ohos_current_ld_command = ohos_current_cc_command 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" ] default_target_configs = [ "//build/lite/config:clang_opt" ]
} }
# Overwrite ld cmd by customed cmd. # Overwrite ld cmd by customed cmd.
...@@ -96,7 +96,7 @@ if (board_toolchain != "" && use_board_toolchain) { ...@@ -96,7 +96,7 @@ if (board_toolchain != "" && use_board_toolchain) {
compile_prefix += "llvm-" compile_prefix += "llvm-"
ohos_current_ar_command = "${compile_prefix}ar$toolchain_cmd_suffix" ohos_current_ar_command = "${compile_prefix}ar$toolchain_cmd_suffix"
ohos_current_ld_command = ohos_current_cxx_command 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") 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:ohos_clang" ]
default_target_configs += [ "//build/lite/config:clang_opt" ] default_target_configs += [ "//build/lite/config:clang_opt" ]
......
...@@ -73,7 +73,7 @@ template("clang_toolchain") { ...@@ -73,7 +73,7 @@ template("clang_toolchain") {
command += "$ld -shared {{ldflags}} {{inputs}} {{libs}} -o $unstripped_outfile" command += "$ld -shared {{ldflags}} {{inputs}} {{libs}} -o $unstripped_outfile"
if (need_strip) { if (need_strip) {
command += " && $strip \"$unstripped_outfile\" \"$outfile\"" command += " && $strip \"$unstripped_outfile\" -o \"$outfile\""
} }
default_output_extension = ".so" default_output_extension = ".so"
...@@ -98,7 +98,7 @@ template("clang_toolchain") { ...@@ -98,7 +98,7 @@ template("clang_toolchain") {
command += command +=
"$ld {{ldflags}} {{inputs}} {{libs}} $custom_ld_flags -o $unstripped_outfile" "$ld {{ldflags}} {{inputs}} {{libs}} $custom_ld_flags -o $unstripped_outfile"
if (need_strip) { if (need_strip) {
command += " && $strip \"$unstripped_outfile\" \"$outfile\"" command += " && $strip \"$unstripped_outfile\" -o \"$outfile\""
} }
description = "LLVM LINK $outfile" description = "LLVM LINK $outfile"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册