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 ...@@ -473,7 +473,7 @@ endif
SPECFLAGS := SPECFLAGS :=
SPECBUILDONLY := false SPECBUILDONLY := false
%.spec2k: % $(OBJDIR)/pnacl-sz make_symlink runtime %.spec2k: % $(OBJDIR)/pnacl-sz make_symlink runtime
./pydir/szbuild_spec2k.py -v --force \ ./pydir/szbuild_spec2k.py -v \
$(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $< $(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $<
$(SPECBUILDONLY) || ( cd ../../../tests/spec2k; \ $(SPECBUILDONLY) || ( cd ../../../tests/spec2k; \
./run_all.sh RunTimedBenchmarks $(SETUP) train $< ) ./run_all.sh RunTimedBenchmarks $(SETUP) train $< )
......
...@@ -61,8 +61,10 @@ def MatchSymbol(sym, re_include, re_exclude, default_match): ...@@ -61,8 +61,10 @@ def MatchSymbol(sym, re_include, re_exclude, default_match):
return default_match return default_match
def AddOptionalArgs(argparser): def AddOptionalArgs(argparser):
argparser.add_argument('--force', dest='force', action='store_true', argparser.add_argument('--force', dest='force', type=int, choices=[0, 1],
help='Force all re-translations of the pexe') default=1,
help='Force all re-translations of the pexe.' +
' Default %(default)s.')
argparser.add_argument('--include', '-i', default=[], dest='include', argparser.add_argument('--include', '-i', default=[], dest='include',
action='append', action='append',
help='Subzero symbols to include ' + help='Subzero symbols to include ' +
...@@ -240,11 +242,11 @@ def main(): ...@@ -240,11 +242,11 @@ def main():
If no --include or --exclude arguments are given, the executable is produced If no --include or --exclude arguments are given, the executable is produced
entirely using Subzero, without using llc or linker tricks. entirely using Subzero, without using llc or linker tricks.
This script uses file modification timestamps to determine whether llc and When using the --force=0 option, this script uses file modification
Subzero re-translation are needed. It checks timestamps of llc, pnacl-sz, timestamps to determine whether llc and Subzero re-translation are needed.
and the pexe against the translated object files to determine the minimal It checks timestamps of llc, pnacl-sz, and the pexe against the translated
work necessary. The --force option suppresses those checks and object files to determine the minimal work necessary. The --force=1 option
re-translates everything. (default) suppresses those checks and re-translates everything.
This script expects various PNaCl and LLVM tools to be found within the 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 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