[igt-dev] [PATCH i-g-t v4] build: rename Meson options

Ser, Simon simon.ser at intel.com
Mon Jul 15 10:51:17 UTC 2019


On Mon, 2019-07-15 at 13:37 +0300, Simon Ser wrote:
> Meson emits a warning because we use options beginning with "build_":
> 
>     DEPRECATION: Option uses prefix "build_", which is reserved for Meson. This will become an error in the future.
> 
> Rename our options so that we don't use the Meson-reserved prefix.
> 
> Signed-off-by: Simon Ser <simon.ser at intel.com>
> ---
> 
> Changes in v4: added a note in NEWS

I don't know if non-maintainers adding stuff to NEWS is a good idea.

For sway/wlroots, we just create an issue about the next release where
all members can comment to append a breaking change/note for the
maintainer.

> Also opened https://github.com/mesonbuild/meson/issues/5655
> 
>  .gitlab-ci.yml      | 20 ++++++++++----------
>  NEWS                |  7 +++++++
>  man/meson.build     |  2 +-
>  meson.build         | 12 ++++++------
>  meson_options.txt   | 22 +++++++++++-----------
>  overlay/meson.build |  2 +-
>  runner/meson.build  |  2 +-
>  7 files changed, 37 insertions(+), 30 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 665fbb79c523..7ed538a4d1fc 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -1,14 +1,14 @@
>  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora:latest
>  variables:
>    MESON_OPTIONS: >
> -    -Dwith_libdrm=intel,nouveau,amdgpu
> -    -Dbuild_overlay=enabled
> -    -Dbuild_chamelium=enabled
> -    -Dwith_valgrind=enabled
> -    -Dbuild_man=enabled
> -    -Dbuild_tests=enabled
> -    -Dbuild_runner=enabled
> -    -Dwith_libunwind=enabled
> +    -Dlibdrm_drivers=intel,nouveau,amdgpu
> +    -Doverlay=enabled
> +    -Dchamelium=enabled
> +    -Dvalgrind=enabled
> +    -Dman=enabled
> +    -Dtests=enabled
> +    -Drunner=enabled
> +    -Dlibunwind=enabled
>    LANG: "C.UTF-8"
> 
>  stages:
> @@ -33,7 +33,7 @@ build:tests-fedora-no-libunwind:
>    stage: build
>    script:
>      - dnf remove -y libunwind-devel
> -    - meson -Dlibunwind=false build
> +    - meson -Dlibunwind=disabled build
>      - ninja -C build
> 
>  # documentation building is different with meson<0.47
> @@ -72,7 +72,7 @@ build:tests-debian-minimal:
>    image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-minimal:latest
>    stage: build
>    script:
> -    - meson -Dbuild_tests=disabled -Dwith_libdrm="" build
> +    - meson -Dtests=disabled -Dlibdrm_drivers="" build
>      - ninja -C build
>    artifacts:
>      paths:
> diff --git a/NEWS b/NEWS
> index d94374fa3d78..d4e381e35be3 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -1,3 +1,10 @@
> +Unreleased
> +----------
> +
> +Meson build options have been renamed. Please check the news options in
> +meson_options.txt and make sure you don't get any warnings when configuring the
> +project.
> +
>  Release 1.24 (2019-06-20)
>  -------------------------
> 
> diff --git a/man/meson.build b/man/meson.build
> index 2c1396af2738..2187e8c505c1 100644
> --- a/man/meson.build
> +++ b/man/meson.build
> @@ -1,4 +1,4 @@
> -build_man = get_option('build_man')
> +build_man = get_option('man')
> 
>  manpages = [
>  	'intel_aubdump',
> diff --git a/meson.build b/meson.build
> index 0629d441d0d1..478869eb671f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -77,10 +77,10 @@ foreach cc_arg : cc_args
>    endif
>  endforeach
> 
> -build_chamelium = get_option('build_chamelium')
> -build_docs = get_option('build_docs')
> -build_tests = not get_option('build_tests').disabled()
> -with_libdrm = get_option('with_libdrm')
> +build_chamelium = get_option('chamelium')
> +build_docs = get_option('docs')
> +build_tests = not get_option('tests').disabled()
> +with_libdrm = get_option('libdrm_drivers')
> 
>  build_info = ['Build type: ' + get_option('buildtype')]
> 
> @@ -118,13 +118,13 @@ pciaccess = dependency('pciaccess', version : '>=0.10')
>  libkmod = dependency('libkmod')
>  libprocps = dependency('libprocps', required : true)
> 
> -libunwind = dependency('libunwind', required : get_option('with_libunwind'))
> +libunwind = dependency('libunwind', required : get_option('libunwind'))
>  build_info += 'With libunwind: @0@'.format(libunwind.found())
> 
>  libdw = dependency('libdw', required : true)
>  pixman = dependency('pixman-1', required : true)
> 
> -valgrind = dependency('valgrind', required : get_option('with_valgrind'))
> +valgrind = dependency('valgrind', required : get_option('valgrind'))
>  if valgrind.found()
>  	config.set('HAVE_VALGRIND', 1)
>  endif
> diff --git a/meson_options.txt b/meson_options.txt
> index 9cca0c4f47eb..8e2e1cf07cbe 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -1,6 +1,6 @@
> -option('build_overlay',
> +option('overlay',
>         type : 'feature',
> -       description : 'Build overlay')
> +       description : 'Build overlay tool')
> 
>  option('overlay_backends',
>         type : 'array',
> @@ -8,37 +8,37 @@ option('overlay_backends',
>         choices : [ 'auto', 'x', 'xv' ],
>         description : 'Overlay backends to enable')
> 
> -option('build_chamelium',
> +option('chamelium',
>         type : 'feature',
> -       description : 'Build chamelium test')
> +       description : 'Build Chamelium test')
> 
> -option('with_valgrind',
> +option('valgrind',
>         type : 'feature',
>         description : 'Build with support for valgrind annotations')
> 
> -option('build_man',
> +option('man',
>         type : 'feature',
>         description : 'Build man pages')
> 
> -option('build_docs',
> +option('docs',
>         type : 'feature',
>         description : 'Build documentation')
> 
> -option('build_tests',
> +option('tests',
>         type : 'feature',
>         description : 'Build tests')
> 
> -option('with_libdrm',
> +option('libdrm_drivers',
>         type : 'array',
>         value : ['auto'],
>         choices : ['', 'auto', 'intel', 'nouveau', 'amdgpu'],
>         description : 'libdrm libraries to be used')
> 
> -option('with_libunwind',
> +option('libunwind',
>         type : 'feature',
>         description : 'Use libunwind')
> 
> -option('build_runner',
> +option('runner',
>         type : 'feature',
>         description : 'Build test runner')
> 
> diff --git a/overlay/meson.build b/overlay/meson.build
> index d2d2b16a8d1b..0a99076206c3 100644
> --- a/overlay/meson.build
> +++ b/overlay/meson.build
> @@ -1,4 +1,4 @@
> -build_overlay = get_option('build_overlay')
> +build_overlay = get_option('overlay')
>  overlay_backends = get_option('overlay_backends')
> 
>  gpu_overlay_src = [
> diff --git a/runner/meson.build b/runner/meson.build
> index 4eff193afa8d..86521f94d88a 100644
> --- a/runner/meson.build
> +++ b/runner/meson.build
> @@ -1,4 +1,4 @@
> -build_runner = get_option('build_runner')
> +build_runner = get_option('runner')
> 
>  runnerlib_sources = [ 'settings.c',
>  		      'job_list.c',
> --
> 2.22.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev


More information about the igt-dev mailing list