• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5if (is_ohos) {
6  import("//build/config/clang/clang.gni")
7  import("//build/misc/overrides/build.gni")
8  import("abi.gni")
9
10  import("//build/config/ohos/musl.gni")
11
12  default_base_libs_root = ""
13
14  declare_args() {
15    base_libs_root = default_base_libs_root
16  }
17
18  # Defines the name the ohos build gives to the current host CPU
19  # architecture, which is different than the names GN uses.
20  if (host_os == "linux") {
21    ohos_host_os = "linux"
22  } else if (host_os == "mac") {
23    ohos_host_os = "darwin"
24  } else {
25    assert(false, "Need toolchain support for your build OS.")
26  }
27
28  if (current_cpu == "arm") {
29    abi_target = "arm-linux-ohos"
30  } else if (current_cpu == "x86") {
31    abi_target = ""
32  } else if (current_cpu == "arm64") {
33    abi_target = "aarch64-linux-ohos"
34  } else if (current_cpu == "x86_64") {
35    abi_target = "x86_64-linux-ohos"
36  } else {
37    assert(false, "Architecture not supported")
38  }
39
40  libclang_rt_file = "${clang_base_path}/lib/clang/${clang_version}/lib/${abi_target}/libclang_rt.builtins.a"
41  libcxxabi_file = "${clang_base_path}/lib/${abi_target}/libc++abi.a"
42  libcxx_ndk_shared_file =
43      "${clang_base_path}/../libcxx-ndk/lib/${abi_target}/libc++_shared.so"
44}
45