Clean-up //third_party/lzma_sdk folder
As part of updating the lzma_sdk, clean up the folders and put them into different subfolders. This puts the files in a more similar organization to the original lzma sdk. Fix up other files to have correct includes. Bug: 1334732 Change-Id: If345eee3ae1b81f1de804b289880ea5755def49f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3727278 Commit-Queue: Dong Sung Chang <donchan@microsoft.com> Reviewed-by: Joshua Pawlicki <waffles@chromium.org> Reviewed-by: Will Harris <wfh@chromium.org> Reviewed-by: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/main@{#1020195}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
80dce241fd
commit
3fa3690256
chrome
credential_provider
installer
services
file_util
tools
build
updater
win
components/zucchini
courgette
third_party/lzma_sdk
BUILD.gn
C
7z.h7zAlloc.c7zAlloc.h7zArcIn.c7zBuf.c7zBuf.h7zCrc.c7zCrc.h7zCrcOpt.c7zDec.c7zFile.c7zFile.h7zStream.c7zTypes.h7zVersion.h7zVersion.rcAlloc.cAlloc.hBcj2.cBcj2.hBra.cBra.hBra86.cBraIA64.cCompiler.hCpuArch.cCpuArch.hDelta.cDelta.hDllSecur.cDllSecur.hLzFind.cLzFind.hLzHash.hLzma2Dec.cLzma2Dec.hLzmaDec.cLzmaDec.hLzmaEnc.cLzmaEnc.hLzmaLib.cLzmaLib.hPrecomp.hRotateDefs.hSha256.cSha256.hSha256Opt.c
Util
Xz.cXz.hXzCrc64.cXzCrc64.hXzCrc64Opt.cXzDec.cchromium.patchbin
@@ -58,7 +58,7 @@ def GetLZMAExec(src_path):
|
|||||||
Returns:
|
Returns:
|
||||||
The executable command to run the 7zip compressor.
|
The executable command to run the 7zip compressor.
|
||||||
"""
|
"""
|
||||||
return (os.path.join(src_path, r'third_party\lzma_sdk\7zr.exe')
|
return (os.path.join(src_path, r'third_party\lzma_sdk\bin\7zr.exe')
|
||||||
if sys.platform == 'win32' else '7zr')
|
if sys.platform == 'win32' else '7zr')
|
||||||
|
|
||||||
def GetCmdLine(command, sz_fn, gcp_7z_fn):
|
def GetCmdLine(command, sz_fn, gcp_7z_fn):
|
||||||
|
@@ -61,7 +61,7 @@ executable("gcp_sfx") {
|
|||||||
deps = [
|
deps = [
|
||||||
":setup_resources",
|
":setup_resources",
|
||||||
":version",
|
":version",
|
||||||
"//third_party/lzma_sdk/Util/SfxSetup:7zS2_source",
|
"//third_party/lzma_sdk/C/Util/SfxSetup:7zS2_source",
|
||||||
]
|
]
|
||||||
configs += [ "//build/config/win:windowed" ]
|
configs += [ "//build/config/win:windowed" ]
|
||||||
}
|
}
|
||||||
|
@@ -317,7 +317,7 @@ if (!(is_component_build && is_debug && target_cpu == "x86") &&
|
|||||||
"--out",
|
"--out",
|
||||||
"$target_name.exe",
|
"$target_name.exe",
|
||||||
"--path_7za",
|
"--path_7za",
|
||||||
"../../third_party/lzma_sdk/Executable",
|
"../../third_party/lzma_sdk/bin",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":mini_installer",
|
":mini_installer",
|
||||||
|
@@ -59,7 +59,7 @@
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const wchar_t k7zaExe[] = L"7za.exe";
|
const wchar_t k7zaExe[] = L"7za.exe";
|
||||||
const wchar_t k7zaPathRelative[] = L"..\\..\\third_party\\lzma_sdk\\Executable";
|
const wchar_t k7zaPathRelative[] = L"..\\..\\third_party\\lzma_sdk\\bin";
|
||||||
const wchar_t kB7[] = L"B7";
|
const wchar_t kB7[] = L"B7";
|
||||||
const wchar_t kBl[] = L"BL";
|
const wchar_t kBl[] = L"BL";
|
||||||
const wchar_t kChromeBin[] = L"Chrome-bin";
|
const wchar_t kChromeBin[] = L"Chrome-bin";
|
||||||
|
@@ -22,10 +22,10 @@
|
|||||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "third_party/lzma_sdk/7z.h"
|
#include "third_party/lzma_sdk/C/7z.h"
|
||||||
#include "third_party/lzma_sdk/7zAlloc.h"
|
#include "third_party/lzma_sdk/C/7zAlloc.h"
|
||||||
#include "third_party/lzma_sdk/7zCrc.h"
|
#include "third_party/lzma_sdk/C/7zCrc.h"
|
||||||
#include "third_party/lzma_sdk/7zFile.h"
|
#include "third_party/lzma_sdk/C/7zFile.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@@ -13,9 +13,9 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "third_party/lzma_sdk/7zCrc.h"
|
#include "third_party/lzma_sdk/C/7zCrc.h"
|
||||||
#include "third_party/lzma_sdk/Xz.h"
|
#include "third_party/lzma_sdk/C/Xz.h"
|
||||||
#include "third_party/lzma_sdk/XzCrc64.h"
|
#include "third_party/lzma_sdk/C/XzCrc64.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@@ -173,7 +173,7 @@ def GenerateDiffPatch(options, orig_file, new_file, patch_file):
|
|||||||
def GetLZMAExec(build_dir):
|
def GetLZMAExec(build_dir):
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
lzma_exec = os.path.join(build_dir, "..", "..", "third_party",
|
lzma_exec = os.path.join(build_dir, "..", "..", "third_party",
|
||||||
"lzma_sdk", "Executable", "7za.exe")
|
"lzma_sdk", "bin", "7za.exe")
|
||||||
else:
|
else:
|
||||||
lzma_exec = '7zr' # Use system 7zr.
|
lzma_exec = '7zr' # Use system 7zr.
|
||||||
return lzma_exec
|
return lzma_exec
|
||||||
|
@@ -70,7 +70,7 @@ copy("signing") {
|
|||||||
sources = [
|
sources = [
|
||||||
"$root_out_dir/certificate_tag.exe",
|
"$root_out_dir/certificate_tag.exe",
|
||||||
"//chrome/tools/build/win/resedit.py",
|
"//chrome/tools/build/win/resedit.py",
|
||||||
"//third_party/lzma_sdk/7zr.exe",
|
"//third_party/lzma_sdk/bin/7zr.exe",
|
||||||
"signing/sign.py",
|
"signing/sign.py",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@@ -88,7 +88,7 @@ def CopySectionFilesToStagingDir(config, section, staging_dir, src_dir,
|
|||||||
def GetLZMAExec(build_dir):
|
def GetLZMAExec(build_dir):
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
lzma_exec = os.path.join(build_dir, "..", "..", "third_party",
|
lzma_exec = os.path.join(build_dir, "..", "..", "third_party",
|
||||||
"lzma_sdk", "Executable", "7za.exe")
|
"lzma_sdk", "bin", "7za.exe")
|
||||||
else:
|
else:
|
||||||
lzma_exec = '7zr' # Use system 7zr.
|
lzma_exec = '7zr' # Use system 7zr.
|
||||||
return lzma_exec
|
return lzma_exec
|
||||||
|
@@ -28,7 +28,7 @@ std::array<uint32_t, 256> MakeCrc32Table() {
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
// Minimalistic CRC-32 implementation for Zucchini usage. Adapted from LZMA SDK
|
// Minimalistic CRC-32 implementation for Zucchini usage. Adapted from LZMA SDK
|
||||||
// (found at third_party/lzma_sdk/7zCrc.c), which is public domain.
|
// (found at third_party/lzma_sdk/C/7zCrc.c), which is public domain.
|
||||||
uint32_t CalculateCrc32(const uint8_t* first, const uint8_t* last) {
|
uint32_t CalculateCrc32(const uint8_t* first, const uint8_t* last) {
|
||||||
DCHECK_GE(last, first);
|
DCHECK_GE(last, first);
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
# include "zlib.h"
|
# include "zlib.h"
|
||||||
#else
|
#else
|
||||||
extern "C" {
|
extern "C" {
|
||||||
# include "third_party/lzma_sdk/7zCrc.h"
|
#include "third_party/lzma_sdk/C/7zCrc.h"
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
107
third_party/lzma_sdk/BUILD.gn
vendored
107
third_party/lzma_sdk/BUILD.gn
vendored
@@ -10,7 +10,10 @@ use_arm_neon_optimizations = (target_cpu == "arm" || target_cpu == "arm64") &&
|
|||||||
arm_use_neon && !(is_win && !is_clang)
|
arm_use_neon && !(is_win && !is_clang)
|
||||||
|
|
||||||
config("lzma_sdk_config") {
|
config("lzma_sdk_config") {
|
||||||
include_dirs = [ "." ]
|
include_dirs = [
|
||||||
|
".",
|
||||||
|
"./C",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Must be in a config for -Wno-self-assign because of how GN orders flags
|
# Must be in a config for -Wno-self-assign because of how GN orders flags
|
||||||
@@ -55,46 +58,46 @@ config("lzma_build_config") {
|
|||||||
|
|
||||||
static_library("lzma_sdk") {
|
static_library("lzma_sdk") {
|
||||||
sources = [
|
sources = [
|
||||||
"7z.h",
|
"C/7z.h",
|
||||||
"7zAlloc.c",
|
"C/7zAlloc.c",
|
||||||
"7zAlloc.h",
|
"C/7zAlloc.h",
|
||||||
"7zArcIn.c",
|
"C/7zArcIn.c",
|
||||||
"7zBuf.c",
|
"C/7zBuf.c",
|
||||||
"7zBuf.h",
|
"C/7zBuf.h",
|
||||||
"7zCrc.c",
|
"C/7zCrc.c",
|
||||||
"7zCrc.h",
|
"C/7zCrc.h",
|
||||||
"7zCrcOpt.c",
|
"C/7zCrcOpt.c",
|
||||||
"7zDec.c",
|
"C/7zDec.c",
|
||||||
"7zFile.c",
|
"C/7zFile.c",
|
||||||
"7zFile.h",
|
"C/7zFile.h",
|
||||||
"7zStream.c",
|
"C/7zStream.c",
|
||||||
"7zTypes.h",
|
"C/7zTypes.h",
|
||||||
"Alloc.c",
|
"C/Alloc.c",
|
||||||
"Alloc.h",
|
"C/Alloc.h",
|
||||||
"Bcj2.c",
|
"C/Bcj2.c",
|
||||||
"Bcj2.h",
|
"C/Bcj2.h",
|
||||||
"Bra.c",
|
"C/Bra.c",
|
||||||
"Bra.h",
|
"C/Bra.h",
|
||||||
"Bra86.c",
|
"C/Bra86.c",
|
||||||
"Compiler.h",
|
"C/Compiler.h",
|
||||||
"CpuArch.c",
|
"C/CpuArch.c",
|
||||||
"CpuArch.h",
|
"C/CpuArch.h",
|
||||||
"Delta.c",
|
"C/Delta.c",
|
||||||
"Delta.h",
|
"C/Delta.h",
|
||||||
"DllSecur.c",
|
"C/DllSecur.c",
|
||||||
"DllSecur.h",
|
"C/DllSecur.h",
|
||||||
"LzFind.c",
|
"C/LzFind.c",
|
||||||
"LzFind.h",
|
"C/LzFind.h",
|
||||||
"LzHash.h",
|
"C/LzHash.h",
|
||||||
"Lzma2Dec.c",
|
"C/Lzma2Dec.c",
|
||||||
"Lzma2Dec.h",
|
"C/Lzma2Dec.h",
|
||||||
"LzmaDec.c",
|
"C/LzmaDec.c",
|
||||||
"LzmaDec.h",
|
"C/LzmaDec.h",
|
||||||
"LzmaEnc.c",
|
"C/LzmaEnc.c",
|
||||||
"LzmaEnc.h",
|
"C/LzmaEnc.h",
|
||||||
"LzmaLib.c",
|
"C/LzmaLib.c",
|
||||||
"LzmaLib.h",
|
"C/LzmaLib.h",
|
||||||
"Precomp.h",
|
"C/Precomp.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||||
@@ -109,21 +112,21 @@ static_library("lzma_sdk") {
|
|||||||
|
|
||||||
static_library("lzma_sdk_xz") {
|
static_library("lzma_sdk_xz") {
|
||||||
sources = [
|
sources = [
|
||||||
"BraIA64.c",
|
"C/BraIA64.c",
|
||||||
"RotateDefs.h",
|
"C/RotateDefs.h",
|
||||||
"Sha256.c",
|
"C/Sha256.c",
|
||||||
"Sha256.h",
|
"C/Sha256.h",
|
||||||
"Xz.c",
|
"C/Xz.c",
|
||||||
"Xz.h",
|
"C/Xz.h",
|
||||||
"XzCrc64.c",
|
"C/XzCrc64.c",
|
||||||
"XzCrc64.h",
|
"C/XzCrc64.h",
|
||||||
"XzCrc64Opt.c",
|
"C/XzCrc64Opt.c",
|
||||||
"XzDec.c",
|
"C/XzDec.c",
|
||||||
]
|
]
|
||||||
|
|
||||||
# TODO(crbug.com/1338627): Enable ARM optimizations
|
# TODO(crbug.com/1338627): Enable ARM optimizations
|
||||||
if (target_cpu == "x86" || target_cpu == "x64") {
|
if (target_cpu == "x86" || target_cpu == "x64") {
|
||||||
sources += [ "Sha256Opt.c" ]
|
sources += [ "C/Sha256Opt.c" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
deps = [ ":lzma_sdk" ]
|
deps = [ ":lzma_sdk" ]
|
||||||
|
0
third_party/lzma_sdk/Util/SfxSetup/BUILD.gn → third_party/lzma_sdk/C/Util/SfxSetup/BUILD.gn
vendored
0
third_party/lzma_sdk/Util/SfxSetup/BUILD.gn → third_party/lzma_sdk/C/Util/SfxSetup/BUILD.gn
vendored
0
third_party/lzma_sdk/Util/SfxSetup/Precomp.h → third_party/lzma_sdk/C/Util/SfxSetup/Precomp.h
vendored
0
third_party/lzma_sdk/Util/SfxSetup/Precomp.h → third_party/lzma_sdk/C/Util/SfxSetup/Precomp.h
vendored
0
third_party/lzma_sdk/Util/SfxSetup/SfxSetup.c → third_party/lzma_sdk/C/Util/SfxSetup/SfxSetup.c
vendored
0
third_party/lzma_sdk/Util/SfxSetup/SfxSetup.c → third_party/lzma_sdk/C/Util/SfxSetup/SfxSetup.c
vendored
0
third_party/lzma_sdk/Util/SfxSetup/resource.rc → third_party/lzma_sdk/C/Util/SfxSetup/resource.rc
vendored
0
third_party/lzma_sdk/Util/SfxSetup/resource.rc → third_party/lzma_sdk/C/Util/SfxSetup/resource.rc
vendored
0
third_party/lzma_sdk/Util/SfxSetup/setup.ico → third_party/lzma_sdk/C/Util/SfxSetup/setup.ico
vendored
0
third_party/lzma_sdk/Util/SfxSetup/setup.ico → third_party/lzma_sdk/C/Util/SfxSetup/setup.ico
vendored
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
Reference in New Issue
Block a user