File build-without-extensions.patch of Package nodejs-electron
Work around this linker error:
[ 9463s] /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: obj/electron/chromium_src/chrome/extension_navigation_ui_data.o: warning: relocation against `_ZN10extensions12WebViewGuest4TypeE' in read-only section `.text'
[ 9463s] /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: obj/electron/chromium_src/chrome/extension_navigation_ui_data.o: in function `guest_view::GuestView<extensions::WebViewGuest>::AsDerivedGuest(guest_view::GuestViewBase*)':
[ 9463s] /home/abuild/rpmbuild/BUILD/src/out/Release/../../components/guest_view/browser/guest_view.h:67:(.text+0xdd): undefined reference to `extensions::WebViewGuest::Type'
This is not upstreamable as the problem is due to Electron changes to chromium, and is in dead code that would be removed in LTO builds.
--- src/extensions/browser/guest_view/web_view/web_view_guest.cc.old 2023-09-28 10:14:03.660044621 +0200
+++ src/extensions/browser/guest_view/web_view/web_view_guest.cc 2023-09-29 08:05:41.827245244 +0200
@@ -285,7 +285,6 @@ std::string WebViewGuest::GetPartitionID
}
// static
-const char WebViewGuest::Type[] = "webview";
const guest_view::GuestViewHistogramValue WebViewGuest::HistogramValue =
guest_view::GuestViewHistogramValue::kWebView;
--- src/extensions/browser/guest_view/web_view/web_view_guest.h.old 2023-09-28 10:14:03.660044621 +0200
+++ src/extensions/browser/guest_view/web_view/web_view_guest.h 2023-09-29 08:06:13.200529820 +0200
@@ -49,7 +49,7 @@ class WebViewGuest : public guest_view::
int embedder_process_id,
int view_instance_id);
- static const char Type[];
+ constexpr static const char Type[] = "webview";
static const guest_view::GuestViewHistogramValue HistogramValue;
// Returns the WebView partition ID associated with the render process