]> git.ipfire.org Git - thirdparty/git.git/commitdiff
meson: wire up USE_NSEC build knob
authorD. Ben Knoble <ben.knoble+github@gmail.com>
Sat, 20 Jun 2026 16:00:24 +0000 (12:00 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 21 Jun 2026 00:54:04 +0000 (17:54 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build
meson_options.txt

index 11488623bfd8f8303cb3e870d700b2072cffffdb..02496b059e03d41d94f28b99d03f86a66f8b3170 100644 (file)
@@ -835,6 +835,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 = [ ]
 
index 659cbb218f46e080c1d4c763b5a299446ea9234f..4e7baed89cd0dabf3361a449732fc9290881ed62 100644 (file)
@@ -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: '',