Skip to content

Commit

Permalink
Continue the cleanup, add wasm meson config
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 22, 2022
1 parent 8165c14 commit 371439f
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 74 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/bootstrap.yml
Expand Up @@ -25,10 +25,10 @@ jobs:
installer: apt
os: ubuntu-20.04
target: linux-i686
#- name: linux-riscv64
#installer: apt
#os: ubuntu-20.04
#target: linux-riscv64
- name: linux-riscv64
installer: apt
os: ubuntu-20.04
target: linux-riscv64
- name: linux-x86_64
installer: apt
os: ubuntu-20.04
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
sudo add-apt-repository -yn ppa:kxstudio-debian/toolchain
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
- name: (apt) Fix GitHub's mess in ubuntu-22.04
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
Expand Down
33 changes: 17 additions & 16 deletions bootstrap-plugins.sh
Expand Up @@ -35,6 +35,12 @@ source setup/env.sh
source setup/functions.sh
source setup/versions.sh

# FIXME glib does not build yet
if [ "${WASM}" -eq 1 ]; then
PAWPAW_SKIP_GLIB=1
PAWPAW_SKIP_FLUIDSYNTH=1
fi

# ---------------------------------------------------------------------------------------------------------------------
# fftw

Expand All @@ -48,16 +54,18 @@ fi

FFTW_EXTRAFLAGS="--disable-alloca --disable-fortran --with-our-malloc"

if [ "${TOOLCHAIN_PREFIX}" = "riscv64-linux-gnu" ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer"
elif [ "${TOOLCHAIN_PREFIX}" = "aarch64-linux-gnu" ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer"
FFTW_EXTRAFLAGS+=" --enable-neon"
elif [ "${TOOLCHAIN_PREFIX}" = "arm-linux-gnueabihf" ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer"
if [ "${LINUX}" -eq 1 ]; then
if [ "${LINUX_TARGET}" = "linux-aarch64" ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer --enable-neon"
elif [ "${LINUX_TARGET}" = "linux-armhf" ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer"
elif [ "${LINUX_TARGET}" = "linux-riscv64" ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer"
fi
elif [ "${WASM}" -eq 1 ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer"
# FIXME macos-universal proper optimizations
# https://github.com/DISTRHO/PawPaw/issues/3
elif [ "${MACOS_UNIVERSAL}" -eq 0 ]; then
FFTW_EXTRAFLAGS+=" --enable-sse2"
fi
Expand All @@ -84,7 +92,7 @@ fi

FFTWF_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-single"

if [ "${TOOLCHAIN_PREFIX}" = "arm-linux-gnueabihf" ]; then
if [ "${LINUX}" -eq 1 ] && [ "${LINUX_TARGET}" = "linux-armhf" ]; then
FFTWF_EXTRAFLAGS+=" --enable-neon"
fi

Expand Down Expand Up @@ -276,11 +284,6 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# fluidsynth

# FIXME glib does not build yet
if [ "${WASM}" -eq 1 ]; then
PAWPAW_SKIP_FLUIDSYNTH=1
fi

if [ -z "${PAWPAW_SKIP_FLUIDSYNTH}" ]; then

FLUIDSYNTH_EXTRAFLAGS="-Denable-floats=ON"
Expand Down Expand Up @@ -339,8 +342,6 @@ CARLA_EXTRAFLAGS+=" HAVE_JACK=false"
CARLA_EXTRAFLAGS+=" HAVE_PULSEAUDIO=false"
CARLA_EXTRAFLAGS+=" HAVE_DGL=false"
CARLA_EXTRAFLAGS+=" HAVE_HYLIA=false"
CARLA_EXTRAFLAGS+=" HAVE_GTK2=false"
CARLA_EXTRAFLAGS+=" HAVE_GTK3=false"
CARLA_EXTRAFLAGS+=" HAVE_X11=false"
CARLA_EXTRAFLAGS+=" HAVE_FFMPEG=false"
CARLA_EXTRAFLAGS+=" HAVE_FLUIDSYNTH=false"
Expand All @@ -366,7 +367,7 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# wine bootstrap (needed for cross-compilation)

if [ "${WIN32}" -eq 1 ] && [ -n "${EXE_WRAPPER}" ] && [ ! -d "${WINEPREFIX}" ]; then
if [ "${EXE_WRAPPER}" = "wine" ]; then
wineboot -u
fi

Expand Down
48 changes: 0 additions & 48 deletions patches/serd/wasm/11_skip-unsupported-linker-flags.patch

This file was deleted.

11 changes: 11 additions & 0 deletions setup/check_target.sh
Expand Up @@ -68,6 +68,17 @@ function check_target() {
"linux"|"Linux")
GCC=1
LINUX=1
if [ "$(uname -m)" = "aarch64" ]; then
LINUX_TARGET="linux-aarch64"
elif [ "$(uname -m)" = "arm" ]; then
LINUX_TARGET="linux-armhf"
elif [ "$(uname -m)" = "i386" ] || [ "$(uname -m)" = "i686" ]; then
LINUX_TARGET="linux-i686"
elif [ "$(uname -m)" = "riscv64" ]; then
LINUX_TARGET="linux-riscv64"
elif [ "$(uname -m)" = "x86_64" ]; then
LINUX_TARGET="linux-x86_64"
fi
;;
"linux-aarch64")
GCC=1
Expand Down
2 changes: 1 addition & 1 deletion setup/env.sh
Expand Up @@ -64,7 +64,7 @@ PAWPAW_TMPDIR="/tmp"
BUILD_FLAGS="-O3 -pipe -I${PAWPAW_PREFIX}/include ${EXTRA_FLAGS}"
BUILD_FLAGS+=" -ffast-math"
BUILD_FLAGS+=" -fomit-frame-pointer -ftree-vectorize -funroll-loops"
BUILD_FLAGS+=" -fPIC -DPIC -DNDEBUG"
BUILD_FLAGS+=" -fPIC -DPIC -DNDEBUG=1"
BUILD_FLAGS+=" -fdata-sections -ffunction-sections -fno-common -fvisibility=hidden"

if [ "${GCC}" -eq 1 ]; then
Expand Down
6 changes: 3 additions & 3 deletions setup/meson/macos-old.ini
@@ -1,6 +1,3 @@
[properties]
needs_exe_wrapper = true

[binaries]
name = 'macos-old'
c = 'i686-apple-darwin10-gcc'
Expand All @@ -17,3 +14,6 @@ system = 'macos'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[properties]
needs_exe_wrapper = true
18 changes: 18 additions & 0 deletions setup/meson/wasm.ini
@@ -0,0 +1,18 @@
[binaries]
name = 'wasm'
c = 'emcc'
cpp = 'em++'
ar = 'emar'
nm = 'emnm'
strip = 'emstrip'
pkgconfig = 'pkg-config'
exe_wrapper = 'emrun --no_server'

[host_machine]
system = 'wasm'
cpu_family = 'x86'
cpu = 'x86'
endian = 'little'

[properties]
needs_exe_wrapper = true
2 changes: 1 addition & 1 deletion setup/versions.sh
Expand Up @@ -94,7 +94,7 @@ FLUIDSYNTH_URL=https://github.com/FluidSynth/fluidsynth.git
MXML_VERSION=38b044ed8ca2a611ed9ed3e26c4b46416335194e # 3.2
MXML_URL=https://github.com/michaelrsweet/mxml.git

CARLA_VERSION=963f194b0ed93829188ffda23320b1dc848f07d8 # 2.5.0pre
CARLA_VERSION=658b5e30c6457fe9ef9a839e06a49912bb4feee2 # 2.5.1~
CARLA_URL=https://github.com/falkTX/Carla.git

# ---------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 371439f

Please sign in to comment.