George Hu pushed to branch main at Arch Linux / Packaging / Packages / sing-box


Commits:
23345e0d by George Hu at 2026-08-13T21:29:22+08:00
Split sed script into two `-e` options for patching cmd_build.go

- - - - -


1 changed file:

- PKGBUILD


Changes:

=====================================
PKGBUILD
=====================================
@@ -46,11 +46,13 @@ prepare() {
     git -c protocol.file.allow=always submodule update
     patch -Np1 -i "${srcdir}/0001-build-use-the-system-toolchain.patch"
     patch -Np1 -i "${srcdir}/0002-build-drop-unknown-clang-flag.patch" -d 
naiveproxy
+
     # `optimize_for_size=true` is actually the `-Os` flag for gcc, which does 
not conform to the official requirement of `-O2`
-    sed -i 's/"optimize_for_size=true"/"optimize_for_size=false"/' 
cmd/build-naive/cmd_build.go
-    # Upstream defaults to using a non-system toolchain, so enabling LTO might 
lead to linking issues.
-    # However, since we build using the system toolchain, LTO should work.
-    sed -i 's/"use_thin_lto=false"/"use_thin_lto=true"/' 
cmd/build-naive/cmd_build.go
+    sed -i \
+        -e '/optimize_for_size/s/true/false/' \
+        -e '/use_thin_lto/s/false/true/' \
+        cmd/build-naive/cmd_build.go
+
     go mod download -modcacherw
 
     pushd "naiveproxy/src"



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/sing-box/-/commit/23345e0d0bc06cd202d4d0e8050f3a8d5b8674b5

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/sing-box/-/commit/23345e0d0bc06cd202d4d0e8050f3a8d5b8674b5
You're receiving this email because of your account on gitlab.archlinux.org. 
Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications 
| Help: https://gitlab.archlinux.org/help


Reply via email to