From 4369aaf208c3bbaf366bb7e7a0cd80cf31c01a49 Mon Sep 17 00:00:00 2001 From: Jerome Wu Date: Wed, 5 Oct 2022 10:05:10 +0800 Subject: [PATCH] Fix prd build --- Dockerfile | 18 +++++++++++++++++- Makefile | 2 +- build/opus.sh | 3 ++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2939542..aa9e80d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -160,7 +160,23 @@ FROM ffmpeg-builder AS ffmpeg-wasm-builder COPY src/bind /src/src/bind COPY src/fftools /src/src/fftools COPY build/ffmpeg-wasm.sh build.sh -ENV FFMPEG_LIBS="-lx264 -lx265 -lvpx -lmp3lame -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lopus -lz -lwebp -lfreetype -lfribidi -lharfbuzz -lass" +ENV FFMPEG_LIBS \ + -lx264 \ + -lx265 \ + -lvpx \ + -lmp3lame \ + -logg \ + -ltheora \ + -lvorbis \ + -lvorbisenc \ + -lvorbisfile \ + -lopus \ + -lz \ + -lwebp \ + -lfreetype \ + -lfribidi \ + -lharfbuzz \ + -lass RUN mkdir -p /src/dist/umd && bash -x /src/build.sh \ ${FFMPEG_LIBS} \ -o dist/umd/ffmpeg-core.js diff --git a/Makefile b/Makefile index 80cb152..6c9dd92 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: dev MT_FLAGS := -sUSE_PTHREADS -pthread -# DEV_ARGS := --progress=plain +DEV_ARGS := --progress=plain DEV_CFLAGS := --profiling DEV_MT_CFLAGS := $(DEV_CFLAGS) $(MT_FLAGS) PROD_CFLAGS := -O3 -msimd128 diff --git a/build/opus.sh b/build/opus.sh index c0e3be7..0cd9faa 100755 --- a/build/opus.sh +++ b/build/opus.sh @@ -4,10 +4,11 @@ set -euo pipefail CONF_FLAGS=( --prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include - --host=i686-gnu # use i686 linux + --host=i686-none # use i686 unknown --enable-shared=no # not to build shared library --disable-asm # not to use asm --disable-rtcd # not to detect cpu capabilities + --disable-intrinsics # not to use intrinsics --disable-doc # not to build docs --disable-extra-programs # not to build demo and tests --disable-stack-protector