aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2021-08-23 08:57:17 -0600
committerGitHub <noreply@github.com>2021-08-23 07:57:17 -0700
commit5756470a2b11b157cc5982e7d488d44f305e03e0 (patch)
tree7eae2152c05b66f7f1f5e5e0a0f821d0f05ec119 /src
parentc5d76c5b9beb7bd0786dcdee377074f0da8bb3ac (diff)
downloadrneovim-5756470a2b11b157cc5982e7d488d44f305e03e0.tar.gz
rneovim-5756470a2b11b157cc5982e7d488d44f305e03e0.tar.bz2
rneovim-5756470a2b11b157cc5982e7d488d44f305e03e0.zip
build: remove CFLAGS from :version in non-debug builds #15424
A step towards reproducible builds.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/version.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 48ef71613e..7c197f1b7f 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -39,7 +39,10 @@ NVIM_VERSION_PRERELEASE
char *Version = VIM_VERSION_SHORT;
char *longVersion = NVIM_VERSION_LONG;
char *version_buildtype = "Build type: " NVIM_VERSION_BUILD_TYPE;
+// Reproducible builds: omit compile info in Release builds. #15424
+#ifndef NDEBUG
char *version_cflags = "Compilation: " NVIM_VERSION_CFLAGS;
+#endif
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "version.c.generated.h"
@@ -2143,7 +2146,9 @@ void list_version(void)
MSG(longVersion);
MSG(version_buildtype);
list_lua_version();
+#ifndef NDEBUG
MSG(version_cflags);
+#endif
#ifdef HAVE_PATHDEF