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( '',