Commit bc3bd502 by Jim Stichnoth

Subzero: Change the szbuild.py --force default.

With the --force option, the behavior of its default setting is dangerous. Specifically, it doesn't retranslate by default when you change the szbuild command-line arguments. This leads to debugging frustration. Therefore, we change the default setting to be "dumb" and always retranslate. For bisection debugging, the user will quickly realize that they want to add "--force=0". BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1608323002 .
parent 4ab4fbed
......@@ -473,7 +473,7 @@ endif
SPECFLAGS :=
SPECBUILDONLY := false
%.spec2k: % $(OBJDIR)/pnacl-sz make_symlink runtime
./pydir/szbuild_spec2k.py -v --force \
./pydir/szbuild_spec2k.py -v \
$(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $<
$(SPECBUILDONLY) || ( cd ../../../tests/spec2k; \
./run_all.sh RunTimedBenchmarks $(SETUP) train $< )
......
......@@ -61,8 +61,10 @@ def MatchSymbol(sym, re_include, re_exclude, default_match):
return default_match
def AddOptionalArgs(argparser):
argparser.add_argument('--force', dest='force', action='store_true',
help='Force all re-translations of the pexe')
argparser.add_argument('--force', dest='force', type=int, choices=[0, 1],
default=1,
help='Force all re-translations of the pexe.' +
' Default %(default)s.')
argparser.add_argument('--include', '-i', default=[], dest='include',
action='append',
help='Subzero symbols to include ' +
......@@ -240,11 +242,11 @@ def main():
If no --include or --exclude arguments are given, the executable is produced
entirely using Subzero, without using llc or linker tricks.
This script uses file modification timestamps to determine whether llc and
Subzero re-translation are needed. It checks timestamps of llc, pnacl-sz,
and the pexe against the translated object files to determine the minimal
work necessary. The --force option suppresses those checks and
re-translates everything.
When using the --force=0 option, this script uses file modification
timestamps to determine whether llc and Subzero re-translation are needed.
It checks timestamps of llc, pnacl-sz, and the pexe against the translated
object files to determine the minimal work necessary. The --force=1 option
(default) suppresses those checks and re-translates everything.
This script expects various PNaCl and LLVM tools to be found within the
native_client tree. When changes are made to these tools, copy them this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment