-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Deterministic scan.c and bootstrap byte comparison check #372
Conversation
6cd0e4f
to
8b82e8d
Compare
8b82e8d
to
5e34608
Compare
Update (2020-02-15): With stage1scan.c being deterministic, I added a byte comparison check (stage2scan.c) here that ensures the generated flex program can build the scanner of itself flawlessly. |
5e34608
to
0320792
Compare
0320792
to
8b1fbf6
Compare
4676fc8
to
9687594
Compare
Updated according to @jannick0 's comments. The new version of this pull request now preserves stage2scan.c even if comparison fails. I don't think generating a diff output is good as it could be lengthy. The file is preserved so if you want to make a diff you could do so yourself. |
Hello. It has been years after I made this pull request. Is Will (or other Flex maintainers) still interested in this? I may try to rebase it to the latest main branch if needed. |
I'm working my way through the backlog (combination of easy and most important first). I am 100% interested in this, yes. |
094dcd2
to
81e1884
Compare
Change the generating rules of scan.c (in dist-hook) and stage1scan.c so that the source and output file names in #line directives are fixed. This would allow the scanner results be comparable to each other. Also in --disable-bootstrap build, the flex binary will now be built with scan.c directly - no more sedding. Signed-off-by: Kang-Che Sung <[email protected]>
Could you update this to account for #640? |
With stage1scan.c being deterministic, it's possible to add a bootstrap check that ensures the generated flex program can build the scanner of itself flawlessly. The check is performed on native build only. Code is partly inspired from GCC's makefile. Signed-off-by: Kang-Che Sung <[email protected]>
81e1884
to
354bdba
Compare
Rebased just now. |
(Split from PR #321)
Change the generating rules of scan.c (in dist-hook) and stage1scan.c
so that the source and output file names in #line directives are fixed.
This would allow the scanner results be comparable to each other.
Also in --disable-bootstrap build, the flex binary will now be built
with scan.c directly - no more sedding.