# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. is_cross_platform_build = defined(build_cross_platform_version) && build_cross_platform_version if (is_cross_platform_build) { import("//build/config/config.gni") if (is_android) { ndk = aosp_ndk_root ndk_host = "" ndk_target = "" ndk_gdbserver = "" if (host_os == "linux") { ndk_host = "linux-x86_64" } else if (host_os == "mac") { ndk_host = "darwin-x86_64" } else if (host_os == "win") { ndk_host = "windows-x86_64" } if (target_cpu == "arm64") { ndk_target = "aarch64-linux-android" ndk_gdbserver = "prebuilt/android-arm64/gdbserver/gdbserver" } else if (target_cpu == "arm") { ndk_target = "armv7a-linux-androideabi" ndk_gdbserver = "prebuilt/android-arm/gdbserver/gdbserver" } else if (target_cpu == "x64") { ndk_target = "x86_64-linux-android" ndk_gdbserver = "prebuilt/android-x86_64/gdbserver/gdbserver" } else if (target_cpu == "x86") { ndk_target = "i686-linux-android" ndk_gdbserver = "prebuilt/android-x86/gdbserver/gdbserver" } } else if (is_ios) { ios_min_target = "10.0" ar = "ar" cc = "clang" cxx = "clang++" win_vc = "" win_toolchain_version = "" clang_win = "" cc_wrapper = "" } } else { is_android = host_os == "android" is_mingw = current_os == "mingw" is_ios = current_os == "ios" || current_os == "tvos" is_ohos = current_os == "ohos" is_tvos = current_os == "tvos" is_linux = current_os == "linux" is_mac = host_os == "mac" if (!defined(is_win)) { is_win = is_mingw } } is_fuchsia = host_os == "fuchsia" sanitize_skia = ""