meson: Only build pipeline handlers needed in the host architecture

By default all pipeline handlers are built, regardless on whether these
are needed in the host architecture or not. It makes more sense to build
only the pipeline handlers that will be used for the given architecture.

Let's do that by default now, but still allow to build the other
pipeline handlers if needed, by using the `pipelines` meson option. For
example, on a x86-64 platform:

  $ meson build
  ...
    Configuration
    Enabled pipelines        : ipu3
                               uvcvideo
    Enabled IPA modules      : ipu3
  ...

  $ meson build -Dpipelines="ipu3,raspberrypi,rkisp1" -Dtest=true
  ...
    Configuration
    Enabled pipelines        : ipu3
                               raspberrypi
                               rkisp1
                               vimc
    Enabled IPA modules      : ipu3
                               raspberrypi
                               rkisp1
                               vimc
  ...

Suggested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Javier Martinez Canillas 2022-12-24 11:28:28 +01:00 committed by Laurent Pinchart
parent e83d94915d
commit 0a8ac1ee06
2 changed files with 29 additions and 2 deletions

View file

@ -164,6 +164,23 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))
# are enabled. # are enabled.
pipelines = get_option('pipelines') pipelines = get_option('pipelines')
if pipelines.contains('auto')
host_cpu = host_machine.cpu_family()
pipelines = []
if host_cpu == 'x86' or host_cpu == 'x86_64'
pipelines += ['ipu3']
elif host_cpu == 'aarch64'
pipelines += ['imx8-isi', 'rkisp1']
endif
if host_cpu == 'arm' or host_cpu == 'aarch64'
pipelines += ['raspberrypi', 'simple']
endif
# Always include the uvcvideo pipeline handler.
pipelines += ['uvcvideo']
endif
if get_option('test') and 'vimc' not in pipelines if get_option('test') and 'vimc' not in pipelines
message('Enabling vimc pipeline handler to support tests') message('Enabling vimc pipeline handler to support tests')
pipelines += ['vimc'] pipelines += ['vimc']

View file

@ -37,8 +37,18 @@ option('lc-compliance',
option('pipelines', option('pipelines',
type : 'array', type : 'array',
choices : ['imx8-isi', 'ipu3', 'raspberrypi', 'rkisp1', 'simple', 'uvcvideo', 'vimc'], value : ['auto'],
description : 'Select which pipeline handlers to include') choices : [
'auto',
'imx8-isi',
'ipu3',
'raspberrypi',
'rkisp1',
'simple',
'uvcvideo',
'vimc'
],
description : 'Select which pipeline handlers to build. If it this set to auto, all the pipelines applicable to the target architecture will be built.')
option('qcam', option('qcam',
type : 'feature', type : 'feature',