From 12bd080c1cd53d1f25b733fc60b3fdf02507dd23 Mon Sep 17 00:00:00 2001 From: Boris Staletic Date: Mon, 7 Oct 2024 22:23:59 +0200 Subject: [PATCH] Make building regex module optional --- build.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 7429b4dcba..039473b418 100755 --- a/build.py +++ b/build.py @@ -568,6 +568,10 @@ def ParseArguments(): parser.add_argument( '--js-completer', action = 'store_true', help = argparse.SUPPRESS ) + parser.add_argument( '--regex', action = argparse.BooleanOptionalAction, + default = True, + help = 'Choose whether to build the regex module. ' + 'Defaults to True.' ) args = parser.parse_args() # coverage is not supported for c++ on MSVC @@ -1301,9 +1305,13 @@ def DoCmakeBuilds( args ): BuildYcmdLib( cmake, cmake_common_args, args ) WritePythonUsedDuringBuild() - BuildRegexModule( args ) BuildWatchdogModule( args ) + # NOTE: Keep BuildRegexModule() as the final step. + # If it fails, at least everything mandatory has been built. + if args.regex + BuildRegexModule( args ) + def PrintReRunMessage(): print( '',