forked from pool/nodejs-electron
- Enable LTO on x64 (Tumbleweed and Fedora only) now that it works correctly. * add seccomp_pbf-no-lto.patch - Do not build some chromium features unused in Electron. - Remove upstream's tinkering with optimization flags. * change chromium-102-compiler.patch - Remove upstream's warning suppression * change chromium-102-compiler.patch * add -Wno-class-memaccess due to log spam * add -Wno-error=narrowing due to non-compliant generated code - Add -DIS_SERIAL_ENABLED_PLATFORM to work around upstream C++ ODR error. - Build main binary as PIE instead of PIC. * change chromium-102-compiler.patch * add fpic.patch - Compile with gcc11 (was 10) on Leap now that it's available. - Add backported patches * compact_enc_det_generated_tables-Wnarrowing.patch * half_float-Wstrict-aliasing.patch * ipcz-buffer_id-Wnarrowing.patch * select_file_dialog_linux_kde-Wodr.patch * string_hasher-type-pun-UB-causes-heap-corruption.patch * unzip-Wsubobject-linkage.patch * web_contents_impl-Wsubobject-linkage.patch - Add patches to fix C++ bugs and submit them upstream * swiftshader-Constants-Wstrict-aliasing.patch * swiftshader-Half-Wstrict-aliasing.patch * v8_initializer-PageAllocator-fpermissive.patch OBS-URL: https://build.opensuse.org/request/show/1031228 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=42
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
Index: electron-17.1.0/build/config/BUILDCONFIG.gn
|
|
===================================================================
|
|
--- electron-17.1.0.orig/build/config/BUILDCONFIG.gn 2022-03-07 17:38:24.389172130 +0100
|
|
+++ electron-17.1.0/build/config/BUILDCONFIG.gn 2022-03-09 08:25:02.246701706 +0100
|
|
@@ -138,6 +138,8 @@ declare_args() {
|
|
# set "is_official_build" to true for any build intended to ship to end-users.
|
|
is_official_build = false
|
|
|
|
+ gcc_lto = false
|
|
+
|
|
# Set to true when compiling with the Clang compiler.
|
|
is_clang = current_os != "linux" ||
|
|
(current_cpu != "s390x" && current_cpu != "s390" &&
|
|
@@ -352,6 +354,12 @@ default_compiler_configs = [
|
|
"//electron/build/config:mas_build",
|
|
]
|
|
|
|
+if (gcc_lto) {
|
|
+ default_compiler_configs += [
|
|
+ "//build/config/compiler:gcc_lto",
|
|
+ ]
|
|
+}
|
|
+
|
|
if (is_win) {
|
|
default_compiler_configs += [
|
|
"//build/config/win:default_cfg_compiler",
|
|
Index: electron-17.1.0/build/config/compiler/BUILD.gn
|
|
===================================================================
|
|
--- electron-17.1.0.orig/build/config/compiler/BUILD.gn 2022-03-09 08:24:53.098851231 +0100
|
|
+++ electron-17.1.0/build/config/compiler/BUILD.gn 2022-03-09 08:25:02.250701641 +0100
|
|
@@ -1880,6 +1880,10 @@ if (is_win) {
|
|
}
|
|
}
|
|
|
|
+config("gcc_lto") {
|
|
+ cflags = [ "-flto=auto" ]
|
|
+}
|
|
+
|
|
config("default_stack_frames") { }
|
|
config("xdefault_stack_frames") {
|
|
if (is_posix || is_fuchsia) {
|
|
Index: electron-17.1.0/sandbox/linux/BUILD.gn
|
|
===================================================================
|