Browse Source

Fix linux armhf and macos build

Signed-off-by: falkTX <falktx@falktx.com>
pull/117/head
falkTX 1 year ago
parent
commit
1da9ce0629
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 20 additions and 2 deletions
  1. +10
    -1
      meson.build
  2. +6
    -0
      meson_options.txt
  3. +4
    -1
      scripts/generate-ttl.sh

+ 10
- 1
meson.build View File

@@ -47,6 +47,9 @@ build_juce7_only = get_option('build-juce7-only')
build_universal = get_option('build-universal')
optimizations = get_option('optimizations') and buildtype != 'debug'
lto_optimizations = get_option('lto-optimizations') and buildtype != 'debug' and not os_windows
neon_optimizations = get_option('neon-optimizations') and buildtype != 'debug' and (
host_machine.cpu_family() == 'arm'
)
sse_optimizations = get_option('sse-optimizations') and buildtype != 'debug' and (
host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
)
@@ -183,7 +186,7 @@ build_flags_release_cpp = [
'-fvisibility-inlines-hidden',
]

if optimizations or sse_optimizations
if optimizations or neon_optimizations or sse_optimizations
build_flags_release += [
'-ffast-math',
]
@@ -217,6 +220,12 @@ if sse_optimizations or build_universal
endif
endif

if neon_optimizations
build_flags_release += [
'-mfpu=neon-vfpv4', '-mfloat-abi=hard',
]
endif

###############################################################################
# build flags (per-OS macros and setup)



+ 6
- 0
meson_options.txt View File

@@ -10,6 +10,12 @@ option('lto-optimizations',
description: 'Enable LTO optimizations',
)

option('neon-optimizations',
type: 'boolean',
value: true,
description: 'Enable NEON optimizations',
)

option('sse-optimizations',
type: 'boolean',
value: true,


+ 4
- 1
scripts/generate-ttl.sh View File

@@ -10,7 +10,10 @@ lib="${3}"
# do a whole dance to try to replicate expected behaviour
if [ -z "${MESON_EXE_WRAPPER}" ]; then
fileout="$(file "${gen}")"
if echo "${fileout}" | grep -q "PE32 executable.*Intel 80386"; then
if echo "${fileout}" | grep -q "Mach-O"; then
MESON_EXE_WRAPPER=""

elif echo "${fileout}" | grep -q "PE32 executable.*Intel 80386"; then
MESON_EXE_WRAPPER="wine"

elif echo "${fileout}" | grep -q "PE32+ executable.*x86-64"; then


Loading…
Cancel
Save