# Copyright (c) 2025 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.
import("//build/ohos.gni")
if (is_asan && use_hwasan) {
prebults_cangjie_sdk_linux_x86_64_path =
"//prebuilts/cangjie_sdk/linux-x64-hwasan/cangjie"
} else {
prebults_cangjie_sdk_linux_x86_64_path =
"//prebuilts/cangjie_sdk/linux-x64/cangjie"
}
cj_config = {
platform_target = ""
dyn_extension = "so"
}
if (current_os == "ohos") {
cj_config.dyn_extension = "so"
if (target_cpu == "arm64") {
cj_config.platform_target = "linux_ohos_aarch64_cjnative"
} else if (target_cpu == "x86_64") {
cj_config.platform_target = "linux_ohos_x86_64_cjnative"
} else if (target_cpu == "arm") {
cj_config.platform_target = "linux_ohos_arm_cjnative"
} else {
assert(false, "unsupport cpu type ${target_cpu}")
}
}