Open Bug 1298779 Opened 8 years ago Updated 2 years ago

Patches modifying js/src/vm/Keywords.h don't work after a single rebuild, do after two

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox51 fixed)

REOPENED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: Waldo, Unassigned)

References

Details

Attachments

(1 file)

Attached patch The offending patch to apply (deleted) — Splinter Review
Update to bfd9274acb82, then do a JS shell build via the usual autoconf/configure/make steps. Now apply the provided patch and rebuild: make -s -C $OBJDIR -j8 With BUILD_VERBOSE_LOG=1, we see that host_kwgen{,.o} is rebuilt (along with a...host...of other files as expected). Now run a test added in that patch: [jwalden@find-waldo-now src]$ python tests/jstests.py $OBJDIR/js/src/js ecma_6/Syntax/escap ## ecma_6/Syntax/escaped-let-identifier.js: rc = 1, run time = 0.044414 self-hosted:2539:43 missing } after function body REGRESSION - ecma_6/Syntax/escaped-let-identifier.js [0|1|0|0] 100% ==========================================================>| 0.1s REGRESSIONS ecma_6/Syntax/escaped-let-identifier.js Now rebuild again: make -s -C $OBJDIR -j8 With BUILD_VERBOSE_LOG=1, we now see jsautokw.h is additionally rebuilt. Now rerun the test: [jwalden@find-waldo-now src]$ python tests/jstests.py $OBJDIR/js/src/js ecma_6/Syntax/escap [1|0|0|0] 100% ==========================================================>| 0.3s PASS The approach to efficiently detect JavaScript keywords is basically to have jskwgen.cpp (that #includes "vm/Keywords.h") that compiles into host_jskwgen, which is run to create jsautokw.h. Somehow, jsautokw.h isn't being regenerated when vm/Keywords.h changes -- the dependency for the executable isn't propagated into a dependency for the generated header. At some point we should generate this header in Python, likely incidentally solving this problem. But rewriting isn't that important, so the build system bug needs another fix. vm/Keywords.h doesn't change often to hit this, but I'm working on two patches (this and another one) that do change it. CLOBBER stands ready, but no one likes that. :-)
On my machine, js/src/.deps/host_jskwgen.o.pp has vm/Keywords.h as a dependency. And backend.mk chains jsautokw.h to host_jskwgen. So this /should/ work. It might be a path normalization problem. host_jskwgen.o.pp is using absolute paths whereas backend.mk and jsautokw.h.pp are using relative paths. We've seen this confuse GNU make before.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Sorry, I set wrong bug number. the changeset is for bug 1302283.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: