aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-23 15:53:32 -0500
committerJack Lloyd <[email protected]>2018-12-23 15:53:32 -0500
commit98c21258228bbee8199ace8d9f5e0c52c9b9d901 (patch)
treebfbbf29ef41c257c3719b602f8576c8667cf0927 /configure.py
parent7302af79bb8341607fbcd72e2d5af09456b4b17e (diff)
Add --no-store-vc-rev option for use in CI builds
This skips putting the git revision in the build.h header. This value changing every time means we effectively disable ccache's direct mode (which is faster than preprocessor mode) and also prevent any caching of the amalgamation file (since version.cpp expands the macro).
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index a4f9ca062..4ae2678e5 100755
--- a/configure.py
+++ b/configure.py
@@ -437,6 +437,9 @@ def process_command_line(args): # pylint: disable=too-many-locals,too-many-state
action='store_true', default=False,
help="Enable extra warnings")
+ build_group.add_option('--no-store-vc-rev', action='store_true', default=False,
+ help=optparse.SUPPRESS_HELP)
+
build_group.add_option('--with-python-versions', dest='python_version',
metavar='N.M',
default='%d.%d' % (sys.version_info[0], sys.version_info[1]),
@@ -1832,7 +1835,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
'version_major': Version.major(),
'version_minor': Version.minor(),
'version_patch': Version.patch(),
- 'version_vc_rev': Version.vc_rev(),
+ 'version_vc_rev': 'unknown' if options.no_store_vc_rev else Version.vc_rev(),
'abi_rev': Version.so_rev(),
'version': Version.as_string(),