diff mbox series

[6/8] configure: support passthrough of -Dxxx args to meson

Message ID 20230801130403.164060-7-berrange@redhat.com (mailing list archive)
State New, archived
Headers show
Series gitlab: speed up msys windows jobs with GCC | expand

Commit Message

Daniel P. Berrangé Aug. 1, 2023, 1:04 p.m. UTC
This can be useful for setting some meson global options, such as the
optimization level or debug state.xs

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 configure | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Huth Aug. 1, 2023, 6:42 p.m. UTC | #1
On 01/08/2023 15.04, Daniel P. Berrangé wrote:
> This can be useful for setting some meson global options, such as the
> optimization level or debug state.xs
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   configure | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/configure b/configure
> index 26ec5e4f54..9fe3718b77 100755
> --- a/configure
> +++ b/configure
> @@ -757,6 +757,9 @@ for opt do
>     # everything else has the same name in configure and meson
>     --*) meson_option_parse "$opt" "$optarg"
>     ;;
> +  # Pass through -Dxxxx options to meson
> +  -D*) meson_options="$meson_options $opt"
> +  ;;
>     esac
>   done
>   
> @@ -887,6 +890,8 @@ cat << EOF
>     pie             Position Independent Executables
>     debug-tcg       TCG debugging (default is disabled)
>   
> +  -Dmesonoptname=val      passthrough option to meson unmodified

I'd rather place that earlier in the help text, above the 
"meson_options_help" line in the configure script, next to the other 
--option=something lines.

  Thomas

>   NOTE: The object files are built at the place where configure is launched
>   EOF
>   exit 0
Daniel P. Berrangé Aug. 1, 2023, 7:07 p.m. UTC | #2
On Tue, Aug 01, 2023 at 08:42:05PM +0200, Thomas Huth wrote:
> On 01/08/2023 15.04, Daniel P. Berrangé wrote:
> > This can be useful for setting some meson global options, such as the
> > optimization level or debug state.xs
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >   configure | 5 +++++
> >   1 file changed, 5 insertions(+)
> > 
> > diff --git a/configure b/configure
> > index 26ec5e4f54..9fe3718b77 100755
> > --- a/configure
> > +++ b/configure
> > @@ -757,6 +757,9 @@ for opt do
> >     # everything else has the same name in configure and meson
> >     --*) meson_option_parse "$opt" "$optarg"
> >     ;;
> > +  # Pass through -Dxxxx options to meson
> > +  -D*) meson_options="$meson_options $opt"
> > +  ;;
> >     esac
> >   done
> > @@ -887,6 +890,8 @@ cat << EOF
> >     pie             Position Independent Executables
> >     debug-tcg       TCG debugging (default is disabled)
> > +  -Dmesonoptname=val      passthrough option to meson unmodified
> 
> I'd rather place that earlier in the help text, above the
> "meson_options_help" line in the configure script, next to the other
> --option=something lines.

Sure I've no preference. I was expecting Paolo to tell me to put it
somewhere else anyway :-)


With regards,
Daniel
diff mbox series

Patch

diff --git a/configure b/configure
index 26ec5e4f54..9fe3718b77 100755
--- a/configure
+++ b/configure
@@ -757,6 +757,9 @@  for opt do
   # everything else has the same name in configure and meson
   --*) meson_option_parse "$opt" "$optarg"
   ;;
+  # Pass through -Dxxxx options to meson
+  -D*) meson_options="$meson_options $opt"
+  ;;
   esac
 done
 
@@ -887,6 +890,8 @@  cat << EOF
   pie             Position Independent Executables
   debug-tcg       TCG debugging (default is disabled)
 
+  -Dmesonoptname=val      passthrough option to meson unmodified
+
 NOTE: The object files are built at the place where configure is launched
 EOF
 exit 0