All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meson: wire up USE_NSEC build knob
@ 2026-06-20 16:00 D. Ben Knoble
  2026-06-21  1:01 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: D. Ben Knoble @ 2026-06-20 16:00 UTC (permalink / raw)
  To: git
  Cc: D. Ben Knoble, brian m . carlson, Junio C Hamano, Jeff King,
	Patrick Steinhardt, Ramsay Jones

Autotools-style builds permit enabling USE_NSEC for cases where that's
desired; the equivalent knob is missing from meson-based builds.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
---
 meson.build       | 4 ++++
 meson_options.txt | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/meson.build b/meson.build
index 3247697f74..85a11119c5 100644
--- a/meson.build
+++ b/meson.build
@@ -838,6 +838,10 @@ if help_format_opt != 'man'
     libgit_c_args += '-DDEFAULT_HELP_FORMAT="' + help_format_opt + '"'
 endif
 
+if get_option('nanosec')
+  libgit_c_args += '-DUSE_NSEC'
+endif
+
 libgit_include_directories = [ '.' ]
 libgit_dependencies = [ ]
 
diff --git a/meson_options.txt b/meson_options.txt
index d936ada098..1bc75278a8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -21,6 +21,8 @@ option('runtime_prefix', type: 'boolean', value: false,
   description: 'Resolve ancillary tooling and support files relative to the location of the runtime binary instead of hard-coding them into the binary.')
 option('sane_tool_path', type: 'array', value: [],
   description: 'An array of paths to pick up tools from in case the normal tools are broken or lacking.')
+option('nanosec', type: 'boolean', value: false,
+  description: 'Care about sub-second file mtimes and ctimes.')
 
 # Build information compiled into Git and other parts like documentation.
 option('build_date', type: 'string', value: '',

base-commit: 0c8ab3ebcc76981376809c8fe632d0fe18e93347
-- 
2.55.0.rc0.738.g0c8ab3ebcc.dirty


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] meson: wire up USE_NSEC build knob
  2026-06-20 16:00 [PATCH] meson: wire up USE_NSEC build knob D. Ben Knoble
@ 2026-06-21  1:01 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2026-06-21  1:01 UTC (permalink / raw)
  To: D. Ben Knoble
  Cc: git, brian m . carlson, Jeff King, Patrick Steinhardt,
	Ramsay Jones

"D. Ben Knoble" <ben.knoble+github@gmail.com> writes:

> Autotools-style builds permit enabling USE_NSEC for cases where that's
> desired; the equivalent knob is missing from meson-based builds.

With or without autoconf, Makefile based build can use USE_NSEC.  It
is a welcome addition to the other side of thw world.  I do not know
if 'meson setup -Dnanosec=true' is a name that is easy to discover,
though.

Will queue.  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-21  1:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-20 16:00 [PATCH] meson: wire up USE_NSEC build knob D. Ben Knoble
2026-06-21  1:01 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.