1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14declare_args() { 15 if (current_cpu == "x86_64" || current_cpu == "x64") { 16 musl_arch = "x86_64" 17 } else if (current_cpu == "arm") { 18 musl_arch = "arm" 19 } else if (current_cpu == "arm64") { 20 musl_arch = "aarch64" 21 } else if (current_cpu == "mipsel") { 22 musl_arch = "mips" 23 } 24} 25 26# Musl_arch is named mips in order to obtain the path name of the source file 27# in the musl repository,but the actual compilation is mipsel 28declare_args() { 29 musl_target_os = "linux" 30 if (current_cpu == "mipsel") { 31 musl_target_triple = "mipsel-linux-ohos" 32 } else { 33 musl_target_triple = "${musl_arch}-linux-ohos" 34 } 35} 36 37declare_args() { 38 if (!defined(product_path)) { 39 product_path = "" 40 } 41 musl_iterate_and_stats_api = true 42 musl_secure_level = 1 43} 44 45declare_args() { 46 runtime_lib_path = 47 "//prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/15.0.4/lib" 48 use_jemalloc = false 49 musl_ported_dir = "intermidiates/${musl_target_os}/musl_src_ported" 50 musl_inc_out_dir = "usr/include/${musl_target_triple}" 51 uapi_dir = "//kernel/linux/patches/linux-5.10/prebuilts/usr/include" 52 musl_dir = "//third_party/musl" 53 musl_porting_dir = "//third_party/musl/porting/linux/user" 54} 55