File seccomp_bpf-no-lto.patch of Package nodejs-electron
--- src/sandbox/linux/BUILD.gn.old 2022-10-12 18:06:31.399406000 +0200
+++ src/sandbox/linux/BUILD.gn 2022-10-22 11:55:59.621396300 +0200
@@ -196,6 +196,27 @@
}
}
+static_library("seccomp_bpf_asm") {
+ sources = [
+ "seccomp-bpf/syscall.cc",
+ "seccomp-bpf/syscall.h",
+ ]
+ defines = [ "SANDBOX_IMPLEMENTATION" ]
+ public_deps = [
+ ":sandbox_services_headers",
+ "//sandbox:sandbox_export",
+ ]
+ deps = [
+ ":sandbox_services",
+ "//base",
+ "//build:chromeos_buildflags",
+ "//sandbox:sandbox_buildflags",
+ ]
+ if (gcc_lto) {
+ configs -= [ "//build/config/compiler:gcc_lto" ]
+ }
+}
+
component("seccomp_bpf") {
sources = [
"bpf_dsl/bpf_dsl.cc",
@@ -227,8 +247,6 @@
"seccomp-bpf/die.h",
"seccomp-bpf/sandbox_bpf.cc",
"seccomp-bpf/sandbox_bpf.h",
- "seccomp-bpf/syscall.cc",
- "seccomp-bpf/syscall.h",
"seccomp-bpf/trap.cc",
"seccomp-bpf/trap.h",
]
@@ -240,6 +258,7 @@
]
deps = [
":sandbox_services",
+ ":seccomp_bpf_asm",
"//base",
"//build:chromeos_buildflags",
"//sandbox:sandbox_buildflags",