1 Star 0 Fork 960

王志豪1/ark_runtime_core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 3.78 KB
一键复制 编辑 原始数据 按行查看 历史
# Copyright (c) 2021 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("//ark/runtime_core/ark_config.gni")
import("//build/ohos.gni")
group("ark_packages") {
if (host_os != "mac") {
deps = [
"$ark_root/libpandabase:libarkbase",
"$ark_root/libpandafile:libarkfile",
"$ark_root/libziparchive:libarkziparchive",
]
}
}
group("ark_packages_for_windows") {
deps = [
"//utils/native/base:utilsecurec",
"$ark_root/runtime:libarkruntime_static_for_windows(//build/toolchain/mingw:mingw_x86_64)",
]
}
group("ark_host_linux_tools_packages") {
if (host_os != "mac") {
deps = [
"$ark_root/assembler:ark_asm(${host_toolchain})",
"$ark_root/disassembler:ark_disasm(${host_toolchain})",
"$ark_root/libpandabase:libarkbase(${host_toolchain})",
"$ark_root/libpandafile:libarkfile(${host_toolchain})",
"$ark_root/libziparchive:libarkziparchive(${host_toolchain})",
]
}
}
group("ark_host_windows_tools_packages") {
if (host_os != "mac" && !ark_standalone_build) {
deps = [
"$ark_root/assembler:ark_asm(//build/toolchain/mingw:mingw_x86_64)",
"$ark_root/disassembler:ark_disasm(//build/toolchain/mingw:mingw_x86_64)",
]
}
}
group("ark_host_mac_tools_packages") {
if (host_os == "mac") {
deps = [
"$ark_root/assembler:ark_asm(//build/toolchain/mac:clang_x64)",
"$ark_root/disassembler:ark_disasm(//build/toolchain/mac:clang_x64)",
]
}
}
# Common config for ark source
config("ark_config") {
if (!ark_standalone_build) {
visibility = [ ":*" ]
}
include_dirs = [ "$ark_root" ]
defines = [ "PANDA_ENABLE_LTO" ]
if (is_linux) {
defines += [
"PANDA_TARGET_UNIX",
"PANDA_TARGET_LINUX",
"PANDA_USE_FUTEX",
]
} else if (is_mingw) {
defines += [
"PANDA_TARGET_WINDOWS",
"_CRTBLD",
"__LIBMSVCRT__",
]
} else if (is_mac) {
defines += [
"PANDA_TARGET_UNIX",
"PANDA_TARGET_MACOS",
]
} else {
defines += [
"PANDA_TARGET_UNIX",
"PANDA_USE_FUTEX",
]
if (!is_standard_system && (current_cpu != "arm" || is_wearable_product)) {
defines += [ "PANDA_TARGET_MOBILE" ]
}
}
if (!is_debug) {
defines += [ "NDEBUG" ]
}
cflags_cc = [
"-std=c++17",
"-pedantic",
"-Wall",
"-Wextra",
"-Werror",
"-Wshadow",
"-fno-rtti",
"-fno-exceptions",
"-Wno-invalid-offsetof",
"-Wno-gnu-statement-expression",
"-Wno-unused-parameter",
"-Wno-unused-result",
]
if (!is_mac && use_pbqp) {
cflags_cc += [
# PBQP regalloc
"-mllvm",
"-regalloc=pbqp",
]
}
if (is_debug) {
cflags_cc += [
"-Og",
"-ggdb3",
]
}
if (current_cpu == "arm") {
defines += [
"PANDA_TARGET_ARM32_ABI_SOFT=1",
"PANDA_TARGET_ARM32",
]
} else if (current_cpu == "arm64") {
defines += [
"PANDA_TARGET_ARM64",
"PANDA_TARGET_64",
"PANDA_ENABLE_GLOBAL_REGISTER_VARIABLES",
"PANDA_USE_32_BIT_POINTER",
]
} else if (current_cpu == "x86") {
defines += [ "PANDA_TARGET_X86" ]
} else if (current_cpu == "amd64" || current_cpu == "x64" ||
current_cpu == "x86_64") {
defines += [
"PANDA_TARGET_64",
"PANDA_TARGET_AMD64",
"PANDA_USE_32_BIT_POINTER",
]
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang-zhihao-1/ark_runtime_core.git
git@gitee.com:wang-zhihao-1/ark_runtime_core.git
wang-zhihao-1
ark_runtime_core
ark_runtime_core
master

搜索帮助