dosbox-staging/meson_options.txt
kcgen 550f48e49e Add zlib-ng support from system or built-in subproject
zlib-ng is an actively maintained and optimized fork of zlib
that includles SIMD optimizations for:
- Intel and AMD's SSE2/3/4, AVX (and more)
- ARM's NEON,
- Power ISA's Altivec, and
- RISC-V's "V" Vector (RVV) extensions

It's enabled by default and will either use the system lib
or, when compiling an optimized build, use the built-in
subproject provided CMake and Meson version 1.3.0 are available.

If those aren't provided or available, then the existing zlib
system lib provides the deflate functionality.
2023-12-14 19:16:34 -08:00

286 lines
8.3 KiB
Meson

option(
'use_sdl2_net',
type: 'boolean',
value: true,
description: 'Enable networking features via SDL2_net (modem, ipx)',
)
option(
'use_opengl',
type: 'boolean',
value: true,
description: 'Enable OpenGL support',
)
option(
'use_fluidsynth',
type: 'boolean',
value: true,
description: 'Enable built-in MIDI support via FluidSynth',
)
option(
'use_mt32emu',
type: 'boolean',
value: true,
description: 'Enable built-in MT-32 emulation support',
)
option(
'use_slirp',
type: 'boolean',
value: true,
description: 'Enable Ethernet emulation using Libslirp',
)
option(
'tracy',
type: 'boolean',
value: false,
description: 'Enable profiling using Tracy',
)
# This option exists only for rare situations when Linux developer cannot
# install ALSA library headers on their machine.
#
# 'auto' translates to 'true' on Linux systems and 'false' everywhere else.
#
option(
'use_alsa',
type: 'combo',
choices: ['auto', 'true', 'false'],
value: 'auto',
description: 'Enable ALSA MIDI support',
)
# This option lets packagers control whether ManyMouse uses the optional X Input
# 2.0 protocol. Because this requires a full X11 library stack, it's useful for
# distributions that either come with a full X11 environment (and want to make
# this a hard dependency), or for those without an X11 environment but may still
# have X11 in their build bots (and don't want this pulled in by accident).
#
option(
'use_xinput2',
type: 'combo',
choices: ['auto', 'true', 'false'],
value: 'auto',
description: 'Let ManyMouse use the X Input 2.0 protocol.',
)
# The built-in zlib-ng is available when compiling with optimizations
# such as when -Dbuildtype is set to 'release','minsize', or
# 'debugoptimized'.
#
# You will need CMake(*) and Meson 1.3.0. If your package manager's
# version of Meson is too old, you can install it using pip.
#
# If you're compiling from sources just for your own local system,
# then you can leave this setting as-is for excellent performance.
#
# If you're compiling a package targeting a range of hardware
# and you have no qualms with built-ins, then set this to the
# most conservative set of SIMD instructions for your supported
# range of hardware. For example, if your binary needs to run on
# Intel's Core 2 Duo (and newer), then:
# meson setup -Duse_zlib_ng=built-in,sse2,ssse3
#
# If you're a repo packager that dislikes built-ins or are
# working under a policy that prohibits them, then use:
# meson setup -Duse_zlib_ng=false
#
# Note: As zlib-ng is, itself, an optimization that adds time
# and complexity to the build process, we therefore only use it
# for optimized build types. Maintainers, developers, and CI
# jobs compiling debug builds aren't burdened with this as
# these builds aren't concerned with maximizing performance.
#
# (*) A Meson project that depends on CMake!? Well, zlib-ng
# is a CMake project and thankfully Meson has a module
# that can both configure it build it. To eliminate this
# dependency on CMake, feel free to contribute a wrap
# for zlib-ng here: https://github.com/mesonbuild/wrapdb
#
option(
'use_zlib_ng',
type: 'array',
choices: [
# Auto (default) try zlib-ng from the system
# and then built-in, in that order.
'auto',
# Only try using zlib-ng from the system.
'system',
# Only try using zlib-ng from built-in.
'built-in',
# Disable zlib-ng; use good old zlib.
'false',
# Native (default) enables those instruction sets supported
# by Meson's build-target machine, which is often the local
# system (unless you're cross-compiling).
# Only guaranteed when the built-in is used.
'native',
# Enable x86 and x86-64 instruction sets.
# Only guaranteed when the built-in is used.
'avx2',
'avx512',
'avx512vnni',
'sse2',
'ssse3',
'sse42',
'pclmulqdq',
'vpclmulqdq',
# Enable Arm instruction sets.
# Only guaranteed when the built-in is used.
'acle',
'neon',
'armv6',
# Enable POWER and PowerPC instruction sets.
# Only guaranteed when the built-in is used.
'altivec',
'power8',
# Enable the RISC-V "V" (vector) instruction set.
# Only guaranteed when the built-in is used.
'rvv',
# Enable the IBM Z instruction sets.
# Only guaranteed when the built-in is used.
'crc32_vx',
'dfltcc_deflate',
'dfltcc_inflate',
],
value: ['auto', 'native'],
description: 'Enable zlib-ng either from the system or built-in',
)
option(
'enable_debugger',
type: 'combo',
choices: ['normal', 'heavy', 'none'],
value: 'none',
description: 'Build emulator with internal debugger feature.',
)
option(
'dynamic_core',
type: 'combo',
choices: ['auto', 'dyn-x86', 'dynrec', 'none'],
value: 'auto',
description: 'Select the dynamic core implementation.',
)
option(
'pagesize',
type: 'integer',
value: 0,
description: 'Set host memory pagesize in bytes (skip detection)',
)
# Per-page write-or-execute (W^X) permissions
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This option lets packagers control if dynamic core memory pages are flagged
# with write-or-execute (W^X) permissions on a per-page basis.
# Platforms that support W^X in hardware can do this with near-zero overhead,
# where as slower platforms like PowerPC and 32-bit ARM SBCs might experience
# signficant performance overhead with this enabled.
#
# Defaults per-platform are in the "src/cpu/meson.build" file, and should
# be OK. However, if you find them to be wrong, please follow the next steps
# to check if per-page W^X is both unecessary and costly.
#
# 1) Create two builds:
# meson setup -Dper_page_w_or_x=enabled build/with_per_page_w_or_x
# meson setup -Dper_page_w_or_x=disabled build/without_per_page_w_or_x
#
# 2) For each build, launch and switch to the dynamic by entering "core dynamic"
# at the Z:\> prompt. If the build without per-page W^X crashes, then stop
# here: your platforms needs W^X.
#
# 3) If the build without per-page W^X didn't crash, now compare how much
# host CPU usage they both consume using your task manager or 'top'.
# If their usages are about the same, then your platform has fast support
# for per-page W^X, so stop here (the defaults are fine).
#
# 4) If the build without per-page W^X is using less CPU usage, then you
# should build with "-Dper_page_w_or_x=disabled". Please also inform
# the maintenance team so they can make this the new default for your
# platform.
#
option(
'per_page_w_or_x',
type: 'feature',
value: 'auto',
description: 'Flag dynamic core memory write-or-execute (W^X) per-page.',
)
# Use this option for selectively switching dependencies to look for static
# libraries first. This behaves differently than passing
# -Ddefault_library=static (which will turn on static linking for dependencies
# built from wraps, but still attempt dynamic linking for system-installed
# libraries).
#
# This is NOT guaranteed to work - the end results will vary depending on your
# OS, installed libraries, and dependencies of those libraries.
#
option(
'try_static_libs',
type: 'array',
choices: [
'fluidsynth',
'glib',
'iir',
'mt32emu',
'opusfile',
'png',
'sdl2',
'sdl2_net',
'slirp',
'speexdsp',
'tracy',
'zlib',
],
value: [],
description: 'Attempt to statically link selected libraries.',
)
option(
'unit_tests',
type: 'feature',
value: 'auto',
description: 'Build unit tests. Auto skips for release builds.',
)
option(
'narrowing_warnings',
type: 'boolean',
value: false,
description: 'Warn about implicit type narrowing',
)
option(
'autovec_info',
type: 'boolean',
value: false,
description: 'Inform about auto-vectorizion results',
)
option(
'asm',
type: 'boolean',
value: false,
description: 'Save intermediate assembly output',
)
option(
'time_trace',
type: 'boolean',
value: false,
description: 'Time build events, for use with the Clang Build Analyzer tool',
)