Skip to content

Commit

Permalink
Update to Chromium 81.0.4044.113
Browse files Browse the repository at this point in the history
  • Loading branch information
tangalbert919 committed Apr 28, 2020
1 parent 183e865 commit e38dcdc
Show file tree
Hide file tree
Showing 14 changed files with 590 additions and 698 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Windows packaging for [ungoogled-chromium](//github.com/Eloston/ungoogled-chromi

## Building

Google only supports [Windows 7 x64 or newer](https://chromium.googlesource.com/chromium/src/+/refs/tags/80.0.3987.122/docs/windows_build_instructions.md#system-requirements). These instructions are tested on Windows 7 Professional x64.
Google only supports [Windows 7 x64 or newer](https://chromium.googlesource.com/chromium/src/+/refs/tags/81.0.4044.113/docs/windows_build_instructions.md#system-requirements). These instructions are tested on Windows 7 Professional x64.

NOTE: The default configuration will build 64-bit binaries for maximum security (TODO: Link some explanation). This can be changed to 32-bit by following the instructions in `build.py`
NOTE: The default configuration will build 64-bit binaries for maximum security (TODO: Link some explanation). This can be changed to 32-bit by setting `target_cpu` to `"x86"` in `flags.windows.gn`.

### Setting up the build environment

**IMPORTANT**: Please setup only what is referenced below. Do NOT setup other Chromium compilation tools like `depot_tools`, since we have a custom build process which avoids using Google's pre-built binaries.

#### Setting up Visual Studio

[Follow the "Visual Studio" section of the official Windows build instructions](https://chromium.googlesource.com/chromium/src/+/refs/tags/80.0.3987.122/docs/windows_build_instructions.md#visual-studio).
[Follow the "Visual Studio" section of the official Windows build instructions](https://chromium.googlesource.com/chromium/src/+/refs/tags/81.0.4044.113/docs/windows_build_instructions.md#visual-studio).

* Make sure to read through the entire section and install/configure all the required components.
* If your Visual Studio is installed in a directory other than the default, you'll need to set a few environment variables to point the toolchains to your installation path. (Copied from [instructions for Electron](https://electronjs.org/docs/development/build-instructions-windows))
Expand Down
11 changes: 9 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import domain_substitution
import prune_binaries
import patches
from _common import ENCODING, SEVENZIP_USE_REGISTRY, ExtractorEnum, get_logger
from _common import ENCODING, USE_REGISTRY, ExtractorEnum, get_logger
sys.path.pop(0)

_ROOT_DIR = Path(__file__).resolve().parent
Expand Down Expand Up @@ -114,9 +114,15 @@ def main():
parser.add_argument(
'--7z-path',
dest='sevenz_path',
default=SEVENZIP_USE_REGISTRY,
default=USE_REGISTRY,
help=('Command or path to 7-Zip\'s "7z" binary. If "_use_registry" is '
'specified, determine the path from the registry. Default: %(default)s'))
parser.add_argument(
'--winrar-path',
dest='winrar_path',
default=USE_REGISTRY,
help=('Command or path to WinRAR\'s "winrar.exe" binary. If "_use_registry" is '
'specified, determine the path from the registry. Default: %(default)s'))
args = parser.parse_args()

# Set common variables
Expand Down Expand Up @@ -151,6 +157,7 @@ def main():
# Unpack downloads
extractors = {
ExtractorEnum.SEVENZIP: args.sevenz_path,
ExtractorEnum.WINRAR: args.winrar_path,
}
get_logger().info('Unpacking downloads...')
downloads.unpack_downloads(download_info, downloads_cache, source_tree, extractors)
Expand Down
13 changes: 7 additions & 6 deletions downloads.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
# `http://prereleases.llvm.org/win-snapshots/LLVM-9.8.7-r123456-win64.exe`
# (link derived from [LLVM Snapshot Builds](http://llvm.org/builds/))
[llvm]
version = 10.0.0-rc2
url = https://prereleases.llvm.org/10.0.0/rc2/LLVM-%(version)s-win64.exe
version = 10.0.0
# Uncomment when pre-release version is used.
#url = https://prereleases.llvm.org/10.0.0/rc2/LLVM-%(version)s-win64.exe
# Uncomment the below instead when a new enough stable version of LLVM comes around
#url = https://releases.llvm.org/%(version)s/LLVM-%(version)s-win64.exe
url = https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s/LLVM-%(version)s-win64.exe
download_filename = LLVM-%(version)s-win64.exe
sha512 = a4cacd3824949be3fa65288a62f83c60a24447376bfc3eb95582f652c59c2d7af0a1e8e5e6df4f88147b16cbdb9f7b714759e5d1661045b3120bf5f1be5a58f9
sha512 = 3603a4be3548dabc7dda94f3ed4384daf8a94337e44ee62c0d54776c79f802b0cb98fc106e902409942e841c39bc672cc6d61153737ad1cc386b609ef25db71c
extractor = 7z
output_path = third_party/llvm-build/Release+Asserts

Expand Down Expand Up @@ -77,10 +78,10 @@ output_path = third_party/ninja

# Pre-built git
[git]
version = 2.25.1
version = 2.26.2
url = https://github.com/git-for-windows/git/releases/download/v%(version)s.windows.1/PortableGit-%(version)s-64-bit.7z.exe
download_filename = PortableGit-%(version)s-64-bit.7z.exe
sha256 = a3f594440431bddbbc434afc88b8acef286c34dcaa20c150a884e274e8696b36
sha256 = dd36f76a815b993165e67ad3cbc8f5b2976e5757a0c808a4a92fb72d1000e1c8
extractor = 7z
output_path = third_party/git

Expand Down
4 changes: 2 additions & 2 deletions patches/debian_buster/fixes/gpu-timeout.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ bug-debian: http://bugs.debian.org/781940

--- a/gpu/ipc/service/gpu_watchdog_thread.cc
+++ b/gpu/ipc/service/gpu_watchdog_thread.cc
@@ -38,7 +38,7 @@ const int kGpuTimeout = 30000;
@@ -39,7 +39,7 @@ const int kGpuTimeout = 30000;
// hangs at context creation during startup. See https://crbug.com/918490.
const int kGpuTimeout = 15000;
#else
-const int kGpuTimeout = 10000;
+const int kGpuTimeout = 20000;
#endif

#if defined(USE_X11)
// The same set of timeouts from Watchdog V2 so we can compare the results
2 changes: 1 addition & 1 deletion patches/inox-patchset/chromium-skia-harmony.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/third_party/skia/src/ports/SkFontHost_FreeType.cpp
+++ b/third_party/skia/src/ports/SkFontHost_FreeType.cpp
@@ -129,9 +129,9 @@ public:
@@ -128,9 +128,9 @@ public:
: fGetVarDesignCoordinates(nullptr)
, fGetVarAxisFlags(nullptr)
, fLibrary(nullptr)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
+++ b/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
@@ -137,11 +137,11 @@ class PendingStartElementNSCallback fina
@@ -138,11 +138,11 @@ class PendingStartElementNSCallback fina
attribute_count_(attribute_count),
defaulted_count_(defaulted_count) {
namespaces_ = static_cast<xmlChar**>(
Expand All @@ -14,7 +14,7 @@
for (int i = 0; i < attribute_count; ++i) {
// Each attribute has 5 elements in the array:
// name, prefix, uri, value and an end pointer.
@@ -156,12 +156,12 @@ class PendingStartElementNSCallback fina
@@ -157,12 +157,12 @@ class PendingStartElementNSCallback fina

~PendingStartElementNSCallback() override {
for (int i = 0; i < namespace_count_ * 2; ++i)
Expand All @@ -31,7 +31,7 @@
}

void Call(XMLDocumentParser* parser) override {
@@ -203,7 +203,7 @@ class PendingCharactersCallback final
@@ -204,7 +204,7 @@ class PendingCharactersCallback final
PendingCharactersCallback(const xmlChar* chars, int length)
: chars_(xmlStrndup(chars, length)), length_(length) {}

Expand All @@ -40,7 +40,7 @@

void Call(XMLDocumentParser* parser) override {
parser->Characters(chars_, length_);
@@ -279,7 +279,7 @@ class PendingErrorCallback final : publi
@@ -280,7 +280,7 @@ class PendingErrorCallback final : publi
line_number_(line_number),
column_number_(column_number) {}

Expand All @@ -51,7 +51,7 @@
parser->HandleError(type_, reinterpret_cast<char*>(message_),
--- a/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc
+++ b/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc
@@ -189,7 +189,7 @@ void XSLStyleSheet::LoadChildSheets() {
@@ -195,7 +195,7 @@ void XSLStyleSheet::LoadChildSheets() {
xmlChar* uri_ref =
xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE);
LoadChildSheet(String::FromUTF8((const char*)uri_ref));
Expand All @@ -60,7 +60,7 @@
} else {
break;
}
@@ -203,7 +203,7 @@ void XSLStyleSheet::LoadChildSheets() {
@@ -209,7 +209,7 @@ void XSLStyleSheet::LoadChildSheets() {
xmlChar* uri_ref =
xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE);
LoadChildSheet(String::FromUTF8((const char*)uri_ref));
Expand All @@ -69,7 +69,7 @@
}
curr = curr->next;
}
@@ -292,8 +292,8 @@ xmlDocPtr XSLStyleSheet::LocateStyleshee
@@ -298,8 +298,8 @@ xmlDocPtr XSLStyleSheet::LocateStyleshee
xmlChar* child_uri =
xmlBuildURI((const xmlChar*)import_href.c_str(), base);
bool equal_ur_is = xmlStrEqual(uri, child_uri);
Expand Down Expand Up @@ -128,7 +128,7 @@

--- a/third_party/libxml/chromium/xml_reader.cc
+++ b/third_party/libxml/chromium/xml_reader.cc
@@ -16,7 +16,7 @@ namespace {
@@ -17,7 +17,7 @@ namespace {
// Same as XmlStringToStdString but also frees |xmlstring|.
std::string XmlStringToStdStringWithDelete(xmlChar* xmlstring) {
std::string result = XmlStringToStdString(xmlstring);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

--- a/chrome/installer/mini_installer/BUILD.gn
+++ b/chrome/installer/mini_installer/BUILD.gn
@@ -184,7 +184,6 @@ template("generate_mini_installer") {
@@ -178,7 +178,6 @@ template("generate_mini_installer") {
":setup_runtime_deps",
"//chrome",
"//chrome/browser/extensions/default_extensions",
Expand All @@ -13,7 +13,7 @@
chrome_dll_target,
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -153,8 +153,14 @@ def GenerateDiffPatch(options, orig_file
@@ -164,8 +164,14 @@ def GenerateDiffPatch(options, orig_file

def GetLZMAExec(build_dir):
if sys.platform == 'win32':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -203,8 +203,6 @@ if (is_win || is_android || is_chromeos)
@@ -193,8 +193,6 @@ if (is_win || is_android || is_chromeos)
# Allow downstream tools to set orderfile path with
# another variable.
chrome_orderfile_path = default_chrome_orderfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

--- a/build/toolchain/win/tool_wrapper.py
+++ b/build/toolchain/win/tool_wrapper.py
@@ -213,10 +213,12 @@ class WinTool(object):
@@ -167,10 +167,12 @@ class WinTool(object):
"""Converts .rc files to .res files."""
env = self._GetEnv(arch)
args = list(args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,14 @@

--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -59,33 +59,6 @@ if (enable_resource_whitelist_generation
}
@@ -62,24 +62,6 @@ if (is_win) {
action("reorder_imports") {
script = "//build/win/reorder-imports.py"

if (is_win) {
- action("reorder_imports") {
- script = "//build/win/reorder-imports.py"
-
- # See comment in chrome_dll.gypi in the hardlink_to_output
- # target for why this cannot be 'initial' like the DLL.
- inputs = [
- "$root_out_dir/initialexe/chrome.exe",
- ]
- outputs = [
- "$root_out_dir/chrome.exe",
- ]
- inputs = [ "$root_out_dir/initialexe/chrome.exe" ]
- outputs = [ "$root_out_dir/chrome.exe" ]
- if (symbol_level != 0) {
- outputs += [ "$root_out_dir/chrome.exe.pdb" ]
- }
Expand All @@ -28,18 +21,16 @@
- "-a",
- current_cpu,
- ]
- deps = [
- ":chrome_initial",
- ]
- deps = [ ":chrome_initial" ]
- }
-
if (!is_multi_dll_chrome) {
# Remove the chrome_child.dll build artifacts from the build directory if
# they're not needed to avoid packaging them in the installer.
@@ -142,21 +115,13 @@ if (!is_android && !is_mac) {
data_deps = [
":chrome_initial",
]
@@ -130,21 +112,13 @@ if (!is_android && !is_mac) {
group("chrome") {
public_deps = [ ":chrome_initial" ]
data_deps = [ ":chrome_initial" ]
- if (is_win) {
- public_deps += [ ":reorder_imports" ]
- data_deps += [ ":reorder_imports" ]
Expand All @@ -61,7 +52,7 @@
# Normally, we need to pass specific flags to the linker to
--- a/chrome/test/chromedriver/BUILD.gn
+++ b/chrome/test/chromedriver/BUILD.gn
@@ -354,11 +354,6 @@ python_library("chromedriver_py_tests")
@@ -352,11 +352,6 @@ python_library("chromedriver_py_tests")
if (is_component_build && is_mac) {
data_deps += [ "//chrome:chrome_framework" ]
}
Expand All @@ -75,7 +66,7 @@
python_library("chromedriver_replay_unittests") {
--- a/tools/perf/chrome_telemetry_build/BUILD.gn
+++ b/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -40,10 +40,6 @@ group("telemetry_chrome_test") {
@@ -42,10 +42,6 @@ group("telemetry_chrome_test") {
data_deps += [ "//chrome" ]
}

Expand All @@ -84,5 +75,5 @@
- }
-
if (is_linux) {
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}
data_deps += [
"//third_party/breakpad:dump_syms($host_toolchain)",
30 changes: 11 additions & 19 deletions patches/ungoogled-chromium/windows/windows-fix-building-gn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,29 @@
- gn_path = options.output or os.path.join(out_dir, 'gn')
+ gn_path = options.output or os.path.join(out_dir, 'gn.exe')
gn_build_dir = os.path.join(out_dir, 'gn_build')
ninja_binary = os.environ.get('NINJA', 'ninja')

# TODO(thomasanderson): Remove this once Ubuntu Trusty reaches EOL, or when
@@ -122,11 +122,11 @@ def main(argv):
@@ -123,11 +123,11 @@ def main(argv):
os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir)
if options.jobs:
subprocess.check_call(
- ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err', '-j'+str(options.jobs)])
+ ['ninja', '-C', gn_build_dir, 'gn.exe', '-w', 'dupbuild=err', '-j'+str(options.jobs)])
- [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', '-j'+str(options.jobs), 'gn'])
+ [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', '-j'+str(options.jobs), 'gn.exe'])
else:
subprocess.check_call(
- ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err'])
- [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn'])
- shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path)
+ ['ninja', '-C', gn_build_dir, 'gn.exe', '-w', 'dupbuild=err'])
+ [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn.exe'])
+ shutil.copy2(os.path.join(gn_build_dir, 'gn.exe'), gn_path)

if not options.skip_generate_buildfiles:
gn_gen_args = options.gn_gen_args or ''
--- a/tools/gn/build/build_win.ninja.template
+++ b/tools/gn/build/build_win.ninja.template
@@ -1,12 +1,12 @@
rule cc
- command = ninja -t msvc -- $cc /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out}
+ command = ninja -t msvc -- $cc /utf-8 /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out}
description = CC ${out}
rspfile = ${out}.rsp
rspfile_content = ${defines} ${includes} ${cflags} ${cflags_c}
@@ -1,5 +1,5 @@
rule cxx
- command = ninja -t msvc -- $cxx /nologo /showIncludes /FC $includes $cflags /c $in /Fo$out
+ command = ninja -t msvc -- $cxx /utf-8 /nologo /showIncludes /FC $includes $cflags /c $in /Fo$out
description = CXX $out
deps = msvc

rule cxx
- command = ninja -t msvc -- $cxx /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out}
+ command = ninja -t msvc -- $cxx /utf-8 /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out}
description = CXX ${out}
rspfile = ${out}.rsp
rspfile_content = ${defines} ${includes} ${cflags} ${cflags_cc}
Loading

0 comments on commit e38dcdc

Please sign in to comment.