From 7c29a0724fa750a1f4de0c7617edc3b63cdd6606 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 21 Jun 2022 03:14:39 +0900 Subject: meson: Enable only SSE and MMX backends for Windows Other backends would not work or do not make sense --- meson.build | 12 +++++++++--- orc/meson.build | 14 +++++++------- 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 -- cgit v1.2.3