1 Star 0 Fork 19

wenlong_12/third_party_lzma

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 3.72 KB
一键复制 编辑 原始数据 按行查看 历史
wenlong_12 提交于 2024-04-18 09:13 . 升级Lzma
# 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("//build/config/arm.gni")
import("//build/ohos.gni")
import("./lzma.gni")
config("lzma_config_common") {
include_dirs = [ "C" ]
cflags = [
"-D_IS_TRY_USE_HW_SHA=0",
"-DZ7_AFFINITY_DISABLE",
"-Wall",
"-Werror",
"-Wno-empty-body",
"-Wno-enum-conversion",
"-Wno-logical-op-parentheses",
"-Wno-self-assign",
"-Wno-implicit-function-declaration",
]
visibility = [ ":*" ]
}
config("lzma_config_host") {
defines = []
defines += [ "target_cpu=${target_cpu}" ]
defines += [ "host_toolchain=${host_toolchain}" ]
defines += [ "current_toolchain=${current_toolchain}" ]
defines += [ "default_toolchain=${default_toolchain}" ]
}
# on device
ohos_source_set("lzma_source_arm") {
configs = [ ":lzma_config_common" ]
public_configs = [ ":lzma_config_common" ]
include_dirs = [ "Asm/arm" ]
cflags = [ "-march=armv7-a" ]
ldflags = [ "-lpthread" ]
sources = common_c_source
}
ohos_source_set("lzma_source_riscv64") {
configs = [ ":lzma_config_common" ]
public_configs = [ ":lzma_config_common" ]
cflags = [ "-march=rv64gc" ]
sources = common_c_source
}
# on device
ohos_source_set("lzma_source_arm64") {
configs = [ ":lzma_config_common" ]
public_configs = [ ":lzma_config_common" ]
include_dirs = [ "Asm/arm64" ]
cflags = [ "-march=armv8-a+crc" ]
sources = common_c_source
sources += arm64_asm_source
}
# on host
ohos_source_set("lzma_source_x86_host") {
configs = [
":lzma_config_common",
":lzma_config_host",
]
public_configs = [
":lzma_config_common",
":lzma_config_host",
]
include_dirs = [ "Asm/x86" ]
sources = common_c_source
}
#on host
ohos_source_set("lzma_source_arm64_host") {
configs = [
":lzma_config_common",
":lzma_config_host",
]
public_configs = [
":lzma_config_common",
":lzma_config_host",
]
include_dirs = [ "Asm/arm64" ]
sources = common_c_source
sources += arm64_asm_source
}
#on host
ohos_source_set("lzma_source_riscv64_host") {
configs = [
":lzma_config_common",
":lzma_config_host",
]
public_configs = [
":lzma_config_common",
":lzma_config_host",
]
sources = common_c_source
}
# on device
ohos_shared_library("lzma_shared") {
public_configs = [ ":lzma_config_common" ]
if (target_cpu == "arm") {
deps = [ ":lzma_source_arm" ]
} else if (target_cpu == "arm64") {
deps = [ ":lzma_source_arm64" ]
} else if (target_cpu == "riscv64") {
deps = [ ":lzma_source_riscv64" ]
}
innerapi_tags = [
"chipsetsdk_indirect",
"platformsdk_indirect",
]
output_name = "lzma"
install_images = [
"system",
"updater",
]
part_name = "lzma"
subsystem_name = "thirdparty"
}
#on host
ohos_static_library("lzma_static") {
public_configs = [
":lzma_config_common",
":lzma_config_host",
]
if (current_cpu == "arm64") {
deps = [ ":lzma_source_arm64_host" ]
} else if (current_cpu == "x86_64" || current_cpu == "x64") {
deps = [ ":lzma_source_x86_host" ]
} else if (current_cpu == "riscv64") {
deps = [ ":lzma_source_riscv64_host" ]
}
part_name = "lzma"
subsystem_name = "thirdparty"
}
group("lzma") {
deps = [
":lzma_shared",
":lzma_static",
]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wenlong_12/third_party_lzma.git
git@gitee.com:wenlong_12/third_party_lzma.git
wenlong_12
third_party_lzma
third_party_lzma
master

搜索帮助