1e509ee18Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
2e509ee18Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3e509ee18Sopenharmony_ci# you may not use this file except in compliance with the License.
4e509ee18Sopenharmony_ci# You may obtain a copy of the License at
5e509ee18Sopenharmony_ci#
6e509ee18Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0
7e509ee18Sopenharmony_ci#
8e509ee18Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9e509ee18Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10e509ee18Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11e509ee18Sopenharmony_ci# See the License for the specific language governing permissions and
12e509ee18Sopenharmony_ci# limitations under the License.
13e509ee18Sopenharmony_ci
14e509ee18Sopenharmony_ciimport("$build_root/config/ohos/musl.gni")
15e509ee18Sopenharmony_ciif (is_ohos) {
16e509ee18Sopenharmony_ci  import("$build_root/config/clang/clang.gni")
17e509ee18Sopenharmony_ci
18e509ee18Sopenharmony_ci  if (current_cpu == "arm") {
19e509ee18Sopenharmony_ci    abi_target = "arm-linux-ohos"
20e509ee18Sopenharmony_ci  } else if (current_cpu == "x86") {
21e509ee18Sopenharmony_ci    abi_target = ""
22e509ee18Sopenharmony_ci  } else if (current_cpu == "arm64") {
23e509ee18Sopenharmony_ci    abi_target = "aarch64-linux-ohos"
24e509ee18Sopenharmony_ci  } else if (current_cpu == "x86_64" || current_cpu == "x64") {
25e509ee18Sopenharmony_ci    abi_target = "x86_64-linux-ohos"
26e509ee18Sopenharmony_ci  } else if (current_cpu == "mipsel") {
27e509ee18Sopenharmony_ci    abi_target = "mipsel-linux-ohos"
28e509ee18Sopenharmony_ci  } else {
29e509ee18Sopenharmony_ci    assert(false, "Arch not supported")
30e509ee18Sopenharmony_ci  }
31e509ee18Sopenharmony_ci  libclang_rt_file = "${clang_base_path}/lib/clang/15.0.4/lib/${abi_target}/libclang_rt.builtins.a"
32e509ee18Sopenharmony_ci  libcxxabi_file = "${clang_base_path}/lib/${abi_target}/libc++abi.a"
33e509ee18Sopenharmony_ci  libcxxso_file = "${clang_base_path}/lib/${abi_target}/libc++.so"
34e509ee18Sopenharmony_ci}
35