From 5ff73b650bb0507565c6a4e289ef227b5879c88f Mon Sep 17 00:00:00 2001 From: Hiroki Tagato Date: Sun, 9 Nov 2025 23:12:53 +0900 Subject: devel/electron39: Add port: Build cross-platform desktop apps with JavaScript, HTML, and CSS Build cross platform desktop apps with JavaScript, HTML, and CSS. It's easier than you think. If you can build a website, you can build a desktop app. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It takes care of the hard parts so you can focus on the core of your application. WWW: https://electronjs.org/ --- .../files/patch-build_config_compiler_BUILD.gn | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 devel/electron39/files/patch-build_config_compiler_BUILD.gn (limited to 'devel/electron39/files/patch-build_config_compiler_BUILD.gn') diff --git a/devel/electron39/files/patch-build_config_compiler_BUILD.gn b/devel/electron39/files/patch-build_config_compiler_BUILD.gn new file mode 100644 index 000000000000..6fa679386033 --- /dev/null +++ b/devel/electron39/files/patch-build_config_compiler_BUILD.gn @@ -0,0 +1,121 @@ +--- build/config/compiler/BUILD.gn.orig 2025-10-21 20:19:54 UTC ++++ build/config/compiler/BUILD.gn +@@ -196,7 +196,7 @@ declare_args() { + # This greatly reduces the size of debug builds, at the cost of + # debugging information which is required by some specialized + # debugging tools. +- simple_template_names = is_clang && !is_win && !is_apple ++ simple_template_names = is_clang && !is_win && !is_apple && !is_bsd + + # This switch is used to enable -Wexit-time-destructors by default. This + # warning serves as a flip switch to allow a gradual migration of targets +@@ -270,7 +270,7 @@ assert(!(llvm_force_head_revision && use_remoteexec && + # + # Since this is referenced both when passing the file and when deciding which + # warnings to enable, store it in a separate variable here. +-use_clang_warning_suppression_file = ++use_clang_warning_suppression_file = !is_bsd && + is_clang && clang_warning_suppression_file != "" + + # default_include_dirs --------------------------------------------------------- +@@ -288,13 +288,16 @@ config("no_unresolved_symbols") { + # Compiler instrumentation can introduce dependencies in DSOs to symbols in + # the executable they are loaded into, so they are unresolved at link-time. + config("no_unresolved_symbols") { +- if (!using_sanitizer && ++ if (!using_sanitizer && !is_bsd && + (is_linux || is_chromeos || is_android || is_fuchsia)) { + ldflags = [ + "-Wl,-z,defs", + "-Wl,--as-needed", + ] + } ++ if (current_cpu == "x86" && is_openbsd) { ++ ldflags = [ "-Wl,-z,notext", "-Wl,--strip-all" ] ++ } + } + + # compiler --------------------------------------------------------------------- +@@ -567,6 +570,10 @@ config("compiler") { + } + } + ++ if (is_openbsd) { ++ ldflags += [ "-Wl,-z,wxneeded" ] ++ } ++ + # Linux-specific compiler flags setup. + # ------------------------------------ + if (use_icf && (!is_apple || use_lld)) { +@@ -657,7 +664,7 @@ config("compiler") { + ldflags += [ "-Wl,-z,keep-text-section-prefix" ] + } + +- if (is_clang) { ++ if (is_clang && !is_bsd) { + cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] + if (save_reproducers_on_lld_crash && use_lld) { + ldflags += [ +@@ -1315,7 +1322,7 @@ config("compiler_cpu_abi") { + # CPU architecture. We may or may not be doing a cross compile now, so for + # simplicity we always explicitly set the architecture. + if (current_cpu == "x64") { +- if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) { ++ if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device && !is_bsd) { + cflags += [ "--target=x86_64-unknown-linux-gnu" ] + ldflags += [ "--target=x86_64-unknown-linux-gnu" ] + } else { +@@ -1324,7 +1331,7 @@ config("compiler_cpu_abi") { + } + cflags += [ "-msse3" ] + } else if (current_cpu == "x86") { +- if (is_clang && !is_android && !is_chromeos_device) { ++ if (is_clang && !is_android && !is_chromeos_device && !Is_bsd) { + cflags += [ "--target=i386-unknown-linux-gnu" ] + ldflags += [ "--target=i386-unknown-linux-gnu" ] + } else { +@@ -1336,7 +1343,7 @@ config("compiler_cpu_abi") { + "-msse3", + ] + } else if (current_cpu == "arm") { +- if (is_clang && !is_android && !is_chromeos_device) { ++ if (is_clang && !is_android && !is_chromeos_device && !is_bsd) { + cflags += [ "--target=arm-linux-gnueabihf" ] + ldflags += [ "--target=arm-linux-gnueabihf" ] + } +@@ -1348,7 +1355,7 @@ config("compiler_cpu_abi") { + cflags += [ "-mtune=$arm_tune" ] + } + } else if (current_cpu == "arm64") { +- if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) { ++ if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device && !is_bsd) { + cflags += [ "--target=aarch64-linux-gnu" ] + ldflags += [ "--target=aarch64-linux-gnu" ] + } +@@ -1747,7 +1754,7 @@ config("clang_revision") { + } + + config("clang_revision") { +- if (is_clang && clang_base_path == default_clang_base_path && ++ if (is_clang && !is_bsd && clang_base_path == default_clang_base_path && + current_os != "zos") { + _perform_consistency_checks = current_toolchain == default_toolchain + if (llvm_force_head_revision) { +@@ -2955,7 +2962,7 @@ config("afdo") { + # There are some targeted places that AFDO regresses, so we provide a separate + # config to allow AFDO to be disabled per-target. + config("afdo") { +- if (is_clang) { ++ if (is_clang && !is_bsd) { + cflags = [] + if (clang_emit_debug_info_for_profiling) { + # Add the following flags to generate debug info for profiling. +@@ -2982,7 +2989,7 @@ config("afdo") { + cflags += [ "-Wno-backend-plugin" ] + inputs = [ _clang_sample_profile ] + } +- } else if (auto_profile_path != "" && is_a_target_toolchain) { ++ } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) { + cflags = [ "-fauto-profile=${auto_profile_path}" ] + inputs = [ auto_profile_path ] + } -- cgit v1.2.3