加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gni 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
程序鸭 提交于 2024-07-29 14:40 . update build
# Copyright (c) 2023-2024 DoubleByte.
# This is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
#
# http://license.coscl.org.cn/MulanPSL2
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
import("//build/template/copy.gni")
import("//build/template/executable.gni")
declare_args() {
enable_ccache = true
build_mode = ""
build_target = ""
compiler = ""
strict = true
root_path = ""
is_duck = false
ide = ""
out_path = ""
etc_path = ""
tmp_path = ""
share_path = ""
var_path = ""
log_path = ""
}
declare_args() {
ccache = ""
strict_options = ""
build_mode_options = ""
if (enable_ccache) {
ccache = "ccache"
}
if (strict) {
strict_options = "-Wall -Werror"
}
if ("alpha" == "$build_mode") {
# alpha版本,用于开发调试
build_mode_options = "-g3"
} else if ("beta" == "$build_mode") {
# beta版本,用于全面测试
build_mode_options = "-O3"
} else if ("release" == "$build_mode") {
# release版本,用于生产环境
build_mode_options = "-O3"
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化