$NetBSD$ * Part of patchset to build electron on NetBSD * Based on OpenBSD's chromium patches, and FreeBSD's electron patches --- third_party/lzma_sdk/BUILD.gn.orig 2025-02-24 19:59:26.000000000 +0000 +++ third_party/lzma_sdk/BUILD.gn @@ -36,13 +36,14 @@ config("lzma_sdk_config") { # (otherwise -Wall will appear after this, and turn it back on). config("lzma_build_config") { defines = [ - "_7ZIP_ST", - "_7Z_NO_METHODS_FILTERS", + "Z7_LZMA_PROB32", + "Z7_NO_METHODS_FILTERS", + "Z7_ST", "_LZMA_PROB32", ] if (enable_lzma_opt) { - defines += [ "_LZMA_DEC_OPT" ] + defines += [ "Z7_LZMA_DEC_OPT" ] } cflags = [] @@ -52,10 +53,6 @@ config("lzma_build_config") { } if (use_arm_neon_optimizations) { - if (is_fuchsia) { - defines += [ "ARMV8_OS_FUCHSIA" ] - } - if (target_cpu == "arm" && arm_version >= 8) { if (is_clang) { cflags += [ @@ -92,6 +89,7 @@ static_library("lzma_sdk") { "C/7zFile.h", "C/7zStream.c", "C/7zTypes.h", + "C/7zWindows.h", "C/Alloc.c", "C/Alloc.h", "C/Bcj2.c", @@ -118,14 +116,13 @@ static_library("lzma_sdk") { "C/LzmaLib.c", "C/LzmaLib.h", "C/Precomp.h", + "C/RotateDefs.h", ] if (enable_lzma_opt) { sources += [ - "Asm/x86/7zCrcOpt.asm", "Asm/x86/LzmaDecOpt.asm", ] - sources -= [ "C/7zCrcOpt.c" ] } configs -= [ "//build/config/compiler:chromium_code" ] @@ -141,9 +138,9 @@ static_library("lzma_sdk") { static_library("lzma_sdk_xz") { sources = [ "C/BraIA64.c", - "C/RotateDefs.h", "C/Sha256.c", "C/Sha256.h", + "C/Sha256Opt.c", "C/Xz.c", "C/Xz.h", "C/XzCrc64.c", @@ -153,11 +150,6 @@ static_library("lzma_sdk_xz") { "C/XzIn.c", ] - # TODO(crbug.com/1338627): Enable ARM optimizations - if (target_cpu == "x86" || target_cpu == "x64") { - sources += [ "C/Sha256Opt.c" ] - } - if (enable_lzma_opt) { sources += [ "Asm/x86/Sha256Opt.asm",