summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-02-03 12:42:06 +0000
committerLibravatar GitHub <noreply@github.com>2025-02-03 12:42:06 +0000
commite1781ff52e860009d10150e3a541423ba004ebb4 (patch)
tree3431f4be29f7895b1521e511172d0850ae5b71b4
parentbumps our fork of modernc.org/sqlite to v1.34.5 (#3731) (diff)
downloadgotosocial-e1781ff52e860009d10150e3a541423ba004ebb4.tar.xz
adds support for build specifically without wasm ffmpeg (#3732)
-rw-r--r--internal/media/ffmpeg/exec_nowasm.go2
-rw-r--r--internal/media/ffmpeg/ffmpeg.go2
-rw-r--r--internal/media/ffmpeg/ffmpeg_nowasm.go2
-rw-r--r--internal/media/ffmpeg/ffprobe.go2
-rw-r--r--internal/media/ffmpeg/ffprobe_nowasm.go2
-rw-r--r--internal/media/ffmpeg/wasm.go2
-rwxr-xr-xscripts/build.sh5
7 files changed, 9 insertions, 8 deletions
diff --git a/internal/media/ffmpeg/exec_nowasm.go b/internal/media/ffmpeg/exec_nowasm.go
index 140cec5bc..4a4646854 100644
--- a/internal/media/ffmpeg/exec_nowasm.go
+++ b/internal/media/ffmpeg/exec_nowasm.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//go:build nowasm
+//go:build nowasmffmpeg || nowasm
package ffmpeg
diff --git a/internal/media/ffmpeg/ffmpeg.go b/internal/media/ffmpeg/ffmpeg.go
index b978201c1..ae88c1e9a 100644
--- a/internal/media/ffmpeg/ffmpeg.go
+++ b/internal/media/ffmpeg/ffmpeg.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//go:build !nowasm
+//go:build !nowasmffmpeg && !nowasm
package ffmpeg
diff --git a/internal/media/ffmpeg/ffmpeg_nowasm.go b/internal/media/ffmpeg/ffmpeg_nowasm.go
index 6f528da1a..eed955ae1 100644
--- a/internal/media/ffmpeg/ffmpeg_nowasm.go
+++ b/internal/media/ffmpeg/ffmpeg_nowasm.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//go:build nowasm
+//go:build nowasmffmpeg || nowasm
package ffmpeg
diff --git a/internal/media/ffmpeg/ffprobe.go b/internal/media/ffmpeg/ffprobe.go
index 410935d9c..bf166b12b 100644
--- a/internal/media/ffmpeg/ffprobe.go
+++ b/internal/media/ffmpeg/ffprobe.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//go:build !nowasm
+//go:build !nowasmffmpeg && !nowasm
package ffmpeg
diff --git a/internal/media/ffmpeg/ffprobe_nowasm.go b/internal/media/ffmpeg/ffprobe_nowasm.go
index 122fb53f4..bc42ea726 100644
--- a/internal/media/ffmpeg/ffprobe_nowasm.go
+++ b/internal/media/ffmpeg/ffprobe_nowasm.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//go:build nowasm
+//go:build nowasmffmpeg || nowasm
package ffmpeg
diff --git a/internal/media/ffmpeg/wasm.go b/internal/media/ffmpeg/wasm.go
index a5612ba14..a22431fdd 100644
--- a/internal/media/ffmpeg/wasm.go
+++ b/internal/media/ffmpeg/wasm.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//go:build !nowasm
+//go:build !nowasmffmpeg && !nowasm
package ffmpeg
diff --git a/scripts/build.sh b/scripts/build.sh
index 6c1b4c50d..3e60cd306 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -23,8 +23,9 @@ GO_GCFLAGS=${GO_GCFLAGS-}
# - debug: enables /debug/pprof endpoint (adds debug, at performance cost)
# - debugenv: enables /debug/pprof endpoint if DEBUG=1 env during runtime (adds debug, at performance cost)
# - moderncsqlite3: reverts to using the C-to-Go transpiled SQLite driver (disables the WASM-based SQLite driver)
-# - nowasm: [UNSUPPORTED] removes all WebAssembly from builds including
-# ffmpeg, ffprobe and SQLite (instead falling back to modernc).
+#
+# - nowasmffmpeg: [UNSUPPORTED] removes WebAssembly ffmpeg, ffprobe, relying instead on host-installed ffmpeg, ffprobe binaries.
+# - nowasm: [UNSUPPORTED] removes all WebAssembly from build. It is the same as passing "nowasmffmpeg, moderncsqlite3".
log_exec env CGO_ENABLED=0 go build -trimpath -v \
-tags "${GO_BUILDTAGS}" \
-ldflags="${GO_LDFLAGS}" \