• 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.
4import("//build/config/sanitizers/sanitizers.gni")
5
6declare_args() {
7  if (current_cpu == "arm") {
8    musl_arch = "arm"
9  } else if (current_cpu == "arm64") {
10    musl_arch = "aarch64"
11  }
12  # musl_root = "$root_out_dir/obj/third_party/musl"
13  # musl_sub_arch = ""
14  # musl_syslib_dir = "/system/bin"
15  # musl_linker_extension = "so.1"
16}
17
18declare_args() {
19  if ((defined(target_os) && target_os == "ohos") ||
20      (defined(ohos_kernel_type) && ohos_kernel_type == "linux")) {
21    musl_target_os = "linux"
22    musl_target_triple = "${musl_arch}-linux-ohos"
23  } else if (defined(ohos_kernel_type) && ohos_kernel_type == "liteos_a") {
24    musl_target_os = "liteos_a"
25    musl_target_triple = "arm-liteos-ohos"
26  }
27}
28
29declare_args() {
30  runtime_lib_path =
31      "//prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/10.0.1/lib"
32  user_custom_libc = true
33  musl_ported_dir = "intermidiates/${musl_target_os}/musl_src_ported"
34  musl_inc_out_dir = "usr/include/${musl_target_triple}"
35  uapi_dir = "//kernel/linux/patches/linux-5.10/prebuilts/usr/include"
36  musl_dir = "//third_party/musl"
37  musl_porting_dir = "//third_party/musl/porting/linux/user"
38
39  # if (is_asan) {
40  #   musl_linker_asan_name =
41  #       musl_syslib_dir + "/ld-musl-${musl_arch}${musl_sub_arch}-asan"
42  #   musl_ldso_path =
43  #       musl_syslib_dir + "/ld-musl-${musl_arch}${musl_sub_arch}-asan." +
44  #       musl_linker_extension
45  # } else {
46  #   musl_ldso_path =
47  #       musl_syslib_dir + "/ld-musl-${musl_arch}${musl_sub_arch}." +
48  #       musl_linker_extension
49  # }
50}
51