适配Linux arm host openharmony编译

Signed-off-by: wylyw78 <wenyu17@hauwei.com>
This commit is contained in:
wylyw78 2024-06-12 20:03:44 +08:00
parent 46dfbbc8c7
commit b9a45cd07a
2 changed files with 6 additions and 6 deletions

View File

@ -15,18 +15,18 @@ import("../build/config.gni")
subsys_name = OHOS_PROFILER_SUBSYS_NAME
part_name = OHOS_PROFILER_PART_NAME
subsys_x64_out = "clang_x64/thirdparty/grpc"
proto_gen_ipc_dir = "clang_x64/$subsys_name/$part_name"
subsys_x64_out = "clang_${host_cpu}/thirdparty/grpc"
proto_gen_ipc_dir = "clang_${host_cpu}/$subsys_name/$part_name"
libc_dir_proto = rebase_path("$asdk_libs_dir", "//")
root_output_dir_proto = rebase_path("$root_out_dir", "//")
#host:clang_x64 default:arm mingw:mingw_x86_64
if (current_toolchain != host_toolchain) {
if (current_toolchain == default_toolchain) {
root_output_dir_proto = "$root_output_dir_proto/clang_x64"
root_output_dir_proto = "$root_output_dir_proto/clang_${host_cpu}"
} else {
root_output_dir_proto =
get_path_info("$root_output_dir_proto", "dir") + "/clang_x64"
get_path_info("$root_output_dir_proto", "dir") + "/clang_${host_cpu}"
}
}
protoc = root_output_dir_proto

View File

@ -148,8 +148,8 @@ action("profiler_service_interface_gen") {
args += rebase_path(sources, root_build_dir)
deps = [
":all_type_gen",
"${OHOS_PROFILER_3RDPARTY_GRPC_DIR}:grpc_cpp_plugin(//build/toolchain/linux:clang_x64)",
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(//build/toolchain/linux:clang_x64)",
"${OHOS_PROFILER_3RDPARTY_GRPC_DIR}:grpc_cpp_plugin(//build/toolchain/linux:clang_${host_cpu})",
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(//build/toolchain/linux:clang_${host_cpu})",
]
}