Re: [PATCH 03/12] meson.build: only set build variables for non-default values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 15, 2025 at 02:46:59AM +0000, Ramsay Jones wrote:
> 
> Some preprocessor -Defines have defaults sets in the source code when
> they have not been provided to the C compiler. In this case, there is
> no need to pass them on the command-line, unless the build requires a
> non-standard value.
> 
> The build variables for DEFAULT_EDITOR, DEFAULT_HELP_FORMAT along with
> DEFAULT_PAGER have appropriate defaults ('vi', 'man' and 'less') set in
> the code. Add the preprocessor -Defines to the 'libgit_c_args' only if
> the values set with the corresponding 'options' are different to these
> standard values.

Hm. Does this really change anything though? The behaviour before and
after this patch are exactly the same as far as I understand, and by
explicitly handling the defaults we basically have to hard-code more
assumptions. So in the current form I don't see that this patch adds
much.

What we _could_ be doing is to completely drop the default values in
"meson_options.txt". In that case we could instead compare whether we
saw the empty string, which allows us to stop encoding the default vaule
both in "meson_options.txt" and in "editor.c".

Patrick




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux