Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/orc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2022-06-20 21:14:39 +0300
committerTim-Philipp Müller <tim@centricular.com>2022-10-31 15:42:29 +0300
commit7c29a0724fa750a1f4de0c7617edc3b63cdd6606 (patch)
tree029f7e9313b4f6d60f1db5504584f0af36ab80a7
parentb639ca626c2cd5fcd3f0daffe1eeee891ba76fea (diff)
meson: Enable only SSE and MMX backends for Windows
Other backends would not work or do not make sense
-rw-r--r--meson.build12
-rw-r--r--orc/meson.build14
2 files changed, 16 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index dc65961..b29dddd 100644
--- a/meson.build
+++ b/meson.build
@@ -41,9 +41,15 @@ endif
# Passing this through the command line would be too messy
cdata.set('ORC_API_EXPORT', export_define)
-all_backends = ['sse', 'mmx', 'altivec', 'neon', 'mips', 'c64x'] # 'arm'
+all_backends = ['sse', 'mmx']
+extra_backends = ['altivec', 'neon', 'mips', 'c64x'] # 'arm'
enabled_backends = []
+host_system = host_machine.system()
+if host_system != 'windows'
+ all_backends += extra_backends
+endif
+
backend = get_option('orc-backend')
foreach b : all_backends
if backend == 'all' or backend == b
@@ -53,14 +59,14 @@ foreach b : all_backends
endforeach
cpu_family = host_machine.cpu_family()
-host_system = host_machine.system()
if cpu_family == 'x86'
cdata.set('HAVE_I386', true)
elif cpu_family == 'x86_64'
cdata.set('HAVE_AMD64', true)
elif cpu_family == 'ppc' or cpu_family == 'ppc64'
cdata.set('HAVE_POWERPC', true)
-elif cpu_family == 'arm'
+# TODO: Windows ARM device is not tested
+elif cpu_family == 'arm' and host_system != 'windows'
cdata.set('HAVE_ARM', true)
# TODO: Add support for Windows
# https://gitlab.freedesktop.org/gstreamer/orc/-/issues/38
diff --git a/orc/meson.build b/orc/meson.build
index 626da63..12e6042 100644
--- a/orc/meson.build
+++ b/orc/meson.build
@@ -53,37 +53,37 @@ orc_headers = [
]
install_headers(orc_headers, subdir : 'orc-' + orc_api + '/orc')
-if backend == 'sse' or backend == 'all'
+if 'sse' in enabled_backends
orc_sources += ['orcsse.c', 'orcrules-sse.c', 'orcprogram-sse.c',
'orcx86.c', 'orcx86insn.c']
endif
-if backend == 'mmx' or backend == 'all'
+if 'mmx' in enabled_backends
# we assume it is ok to include the same file (orcx86) twice
# in case all backends are selected (ie mmx and sse)
orc_sources += ['orcmmx.c', 'orcrules-mmx.c', 'orcprogram-mmx.c', 'orcx86.c']
endif
-if backend == 'altivec' or backend == 'all'
+if 'altivec' in enabled_backends
orc_sources += ['orcrules-altivec.c', 'orcprogram-altivec.c', 'orcpowerpc.c']
endif
-if backend == 'neon' or backend == 'all'
+if 'neon' in enabled_backends
orc_sources += ['orcprogram-neon.c', 'orcrules-neon.c', 'orcarm.c']
endif
# ARM backend is disabled until it has decent coverage
-if backend == 'arm' or backend == 'all'
+if 'arm' in enabled_backends
# we assume it is ok to include the same file (orcarm) twice
# in case all backends are selected (ie neon and arm)
# orc_sources += ['orcprogram-arm.c', 'orcrules-arm.c', 'orcarm.c']
endif
-if backend == 'c64x' or backend == 'all'
+if 'c64x' in enabled_backends
orc_sources += ['orcprogram-c64x-c.c']
endif
-if backend == 'mips' or backend == 'all'
+if 'mips' in enabled_backends
orc_sources += ['orcmips.c', 'orcprogram-mips.c', 'orcrules-mips.c']
endif