bazel: increase logging during build, set job limit (#16024)

To better help in troubleshooting build issues. Job limit might also
help with the memory limit issues we've been seeing.
This commit is contained in:
Andrew W Elble 2020-04-13 17:35:39 -04:00 committed by GitHub
parent 0a6d9f4c55
commit 92edc68922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,17 @@ def url_for_version(self, version):
def setup_build_environment(self, env):
env.set('EXTRA_BAZEL_ARGS',
# Spack's logs don't handle colored output well
'--color=no --host_javabase=@local_jdk//:jdk')
'--color=no --host_javabase=@local_jdk//:jdk'
# Enable verbose output for failures
' --verbose_failures'
# Ask bazel to explain what it's up to
# Needs a filename as argument
' --explain=explainlogfile.txt'
# Increase verbosity of explanation,
' --verbose_explanations'
# Show (formatted) subcommands being executed
' --subcommands=pretty_print'
' --jobs={0}'.format(make_jobs))
def bootstrap(self, spec, prefix):
bash = which('bash')