diff --git a/BUILD.gn b/BUILD.gn index 00f7708bdef9ae2987a87f5c77317302e8125e56..add1b28c1ac1d4f035e0c5654b0903e9bfe97e76 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -55,6 +55,12 @@ ohos_source_set("lzma_source_riscv64") { cflags = [ "-march=rv64gc" ] sources = common_c_source } +ohos_source_set("lzma_source_loongarch64") { + configs = [ ":lzma_config_common" ] + public_configs = [ ":lzma_config_common" ] + cflags = [ "-march=loongarch64" ] + sources = common_c_source +} # on device ohos_source_set("lzma_source_arm64") { @@ -116,6 +122,20 @@ ohos_source_set("lzma_source_riscv64_host") { sources = common_c_source } +#on host +ohos_source_set("lzma_source_loongarch64_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") { branch_protector_ret = "pac_ret" @@ -127,6 +147,8 @@ ohos_shared_library("lzma_shared") { deps = [ ":lzma_source_arm64" ] } else if (target_cpu == "riscv64") { deps = [ ":lzma_source_riscv64" ] + } else if (target_cpu == "loongarch64") { + deps = [ ":lzma_source_loongarch64" ] } innerapi_tags = [ "chipsetsdk_indirect", @@ -154,6 +176,8 @@ ohos_static_library("lzma_static") { deps = [ ":lzma_source_x86_host" ] } else if (current_cpu == "riscv64") { deps = [ ":lzma_source_riscv64_host" ] + } else if (current_cpu == "loongarch64") { + deps = [ ":lzma_source_loongarch64_host" ] } part_name = "lzma"