Skip to content

Commit

Permalink
build: move libcc patches to electron repo (electron#14104)
Browse files Browse the repository at this point in the history
In the GN build, libchromiumcontent is no longer a distinct library, but
merely a container for a set of scripts and patches. Maintaining those
patches in a separate repository is tedious and error-prone, so merge
them into the main repo.

Once this is merged and GN is the default way to build Electron, the
libchromiumcontent repository can be archived.
  • Loading branch information
nornagon authored Sep 14, 2018
1 parent 9e85bdb commit 76c5f5c
Show file tree
Hide file tree
Showing 147 changed files with 86,931 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
/vendor/python_26/
/vendor/native_mksnapshot
/vendor/LICENSES.chromium.html
/vendor/pyyaml
node_modules/
SHASUMS256.txt
**/yarn.lock
Expand Down
16 changes: 10 additions & 6 deletions DEPS
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
vars = {
'chromium_version':
'67.0.3396.99',
'libchromiumcontent_revision':
'5db6529f9663a48ee3e6f4265a6abe7806f1dfbf',
'node_version':
'9dcbed23f016d3ad081be6ec7fb5122e57862da7',

'pyyaml_version':
'3.12',

'chromium_git':
'https://chromium.googlesource.com',

'electron_git':
'/~https://github.com/electron',

'yaml_git':
'/~https://github.com/yaml',

'checkout_nacl':
False,
'checkout_libaom':
Expand All @@ -23,22 +27,22 @@ vars = {
deps = {
'src':
(Var("chromium_git")) + '/chromium/src.git@' + (Var("chromium_version")),
'src/libchromiumcontent':
(Var("electron_git")) + '/libchromiumcontent.git@' + (Var("libchromiumcontent_revision")),
'src/third_party/electron_node':
(Var("electron_git")) + '/node.git@' + (Var("node_version")),
'src/electron/vendor/pyyaml':
(Var("yaml_git")) + '/pyyaml.git@' + (Var("pyyaml_version")),
}

hooks = [
{
'action': [
'python',
'src/libchromiumcontent/script/apply-patches',
'src/electron/script/apply-patches',
'--project-root=.',
'--commit'
],
'pattern':
'src/libchromiumcontent',
'src/electron',
'name':
'patch_chromium'
},
Expand Down
25 changes: 25 additions & 0 deletions build/config/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
config("build_time_executable") {
configs = []

if (is_electron_build && !is_component_build) {
# The executables which have this config applied are dependent on ffmpeg,
# which is always a shared library in an Electron build. However, in the
# non-component build, executables don't have rpath set to search for
# libraries in the executable's directory, so ffmpeg cannot be found. So
# let's make sure rpath is set here.
# See '//build/config/gcc/BUILD.gn' for details on the rpath setting.
if (is_linux) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}

if (is_mac) {
ldflags = [ "-Wl,-rpath,@loader_path/." ]
}
}
}
# For MAS build, we force defining "MAS_BUILD".
config("mas_build") {
if (is_mas_build) {
defines = [ "MAS_BUILD" ]
}
}
6 changes: 6 additions & 0 deletions patches/common/angle/.patches.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repo: src/third_party/angle
patches:
-
author: Ales Pergl <alpergl@microsoft.com>
file: dcheck.patch
description: null
13 changes: 13 additions & 0 deletions patches/common/angle/dcheck.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/common/debug.h b/src/common/debug.h
index 0108ff655..57fbc5ac5 100644
--- a/src/common/debug.h
+++ b/src/common/debug.h
@@ -190,7 +190,7 @@ std::ostream &FmtHexInt(std::ostream &os, T value)

#define ANGLE_EMPTY_STATEMENT for (;;) break
#if !defined(NDEBUG) || defined(ANGLE_ENABLE_RELEASE_ASSERTS)
-#define ANGLE_ENABLE_ASSERTS
+// #define ANGLE_ENABLE_ASSERTS
#endif

#define WARN() ANGLE_LOG(WARN)
12 changes: 12 additions & 0 deletions patches/common/boringssl/.patches.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repo: src/third_party/boringssl/src
patches:
-
author: Jeremy Apthorp <nornagon@nornagon.net>
file: 0001-Implement-legacy-OCSP-APIs-for-libssl.patch
description: see patch header
-
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
file: implement-SSL_get_tlsext_status_type.patch
description: |
BoringSSL doesn't implement `SSL_get_tlsext_status_type()`,
but Node.js expects it to be present cause OpenSSL has it.
Loading

0 comments on commit 76c5f5c

Please sign in to comment.