提交 f33fb977 编写于 作者: Y yangming_ha

#I45ICV: 产品配置config.json中开发板适配目录配置vendor_adapter_dir移到开发板config.gni中

Signed-off-by: Nyangming_ha <yangming_ha@163.com>
上级 e41bfa40
...@@ -57,6 +57,12 @@ if (ohos_build_enable_ccache) { ...@@ -57,6 +57,12 @@ if (ohos_build_enable_ccache) {
compile_prefix = "" compile_prefix = ""
} }
# Load board adapter dir from board config.
if (board_adapter_dir != "") {
ohos_board_adapter_dir = board_adapter_dir
ohos_vendor_adapter_dir = board_adapter_dir
}
# Set current toolchain with to board configuration. # Set current toolchain with to board configuration.
if (board_toolchain != "" && use_board_toolchain) { if (board_toolchain != "" && use_board_toolchain) {
ohos_build_compiler = board_toolchain_type ohos_build_compiler = board_toolchain_type
...@@ -71,7 +77,8 @@ if (board_toolchain != "" && use_board_toolchain) { ...@@ -71,7 +77,8 @@ if (board_toolchain != "" && use_board_toolchain) {
ohos_current_cxx_command = "${compile_prefix}g++$toolchain_cmd_suffix" ohos_current_cxx_command = "${compile_prefix}g++$toolchain_cmd_suffix"
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}strip$toolchain_cmd_suffix --strip-unneeded" ohos_current_strip_command =
"${compile_prefix}strip$toolchain_cmd_suffix --strip-unneeded"
default_target_configs = [ "//build/lite/config:gcc_opt" ] default_target_configs = [ "//build/lite/config:gcc_opt" ]
} else if (board_toolchain_type == "clang") { } else if (board_toolchain_type == "clang") {
ohos_current_cc_command = "${compile_prefix}clang$toolchain_cmd_suffix" ohos_current_cc_command = "${compile_prefix}clang$toolchain_cmd_suffix"
...@@ -79,11 +86,13 @@ if (board_toolchain != "" && use_board_toolchain) { ...@@ -79,11 +86,13 @@ 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}strip$toolchain_cmd_suffix --strip-unneeded" 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.
if(defined(board_customed_ld_cmd) && board_customed_ld_cmd != "") { if (defined(board_customed_ld_cmd) && board_customed_ld_cmd != "") {
ohos_current_ld_command = board_customed_ld_cmd ohos_current_ld_command = board_customed_ld_cmd
} }
} else { } else {
...@@ -96,7 +105,8 @@ if (board_toolchain != "" && use_board_toolchain) { ...@@ -96,7 +105,8 @@ 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}strip$toolchain_cmd_suffix --strip-unneeded" 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" ]
...@@ -116,9 +126,8 @@ if (ohos_build_type == "debug") { ...@@ -116,9 +126,8 @@ if (ohos_build_type == "debug") {
} }
if (ohos_kernel_type == "liteos_a") { if (ohos_kernel_type == "liteos_a") {
default_target_configs += [ default_target_configs +=
"//build/lite/config/kernel/liteos/cortex_a:default" [ "//build/lite/config/kernel/liteos/cortex_a:default" ]
]
} }
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
...@@ -194,6 +203,7 @@ Variables_Dependent_Configs = [ ...@@ -194,6 +203,7 @@ Variables_Dependent_Configs = [
Variables_General = [ Variables_General = [
"check_includes", "check_includes",
#"configs", # configs are set by set_defaults #"configs", # configs are set by set_defaults
"data", "data",
"friend", "friend",
...@@ -230,7 +240,8 @@ Variables_Action = [ ...@@ -230,7 +240,8 @@ Variables_Action = [
] ]
Variables_Action_Foreach = Variables_Action Variables_Action_Foreach = Variables_Action
Variables_Source_Set = Variables_Flags + Variables_Deps + Variables_Dependent_Configs + Variables_General Variables_Source_Set = Variables_Flags + Variables_Deps +
Variables_Dependent_Configs + Variables_General
Variables_Executable = Variables_Source_Set + Variables_Rust_Variables Variables_Executable = Variables_Source_Set + Variables_Rust_Variables
Variables_Shared_Library = Variables_Executable Variables_Shared_Library = Variables_Executable
Variables_Static_Library = Variables_Executable + [ "complete_static_lib" ] Variables_Static_Library = Variables_Executable + [ "complete_static_lib" ]
......
...@@ -63,7 +63,11 @@ if (product_path != "") { ...@@ -63,7 +63,11 @@ if (product_path != "") {
# Supported kernel: "liteos_a", "liteos_m", "linux" # Supported kernel: "liteos_a", "liteos_m", "linux"
ohos_kernel_type = product_config.kernel_type ohos_kernel_type = product_config.kernel_type
ohos_vendor_adapter_dir = product_config.vendor_adapter_dir # To be deleted, and will use board config.
if (defined(product_config.vendor_adapter_dir)) {
ohos_vendor_adapter_dir = product_config.vendor_adapter_dir
ohos_board_adapter_dir = ohos_vendor_adapter_dir
}
ohos_product_adapter_dir = product_config.product_adapter_dir ohos_product_adapter_dir = product_config.product_adapter_dir
ohos_third_party_dir = product_config.third_party_dir ohos_third_party_dir = product_config.third_party_dir
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册