byuccl / bfasst

Tools for FPGA Assurance Flows
Apache License 2.0
12 stars 5 forks source link

remove rule to build itself #490

Closed reillymck closed 5 months ago

reillymck commented 5 months ago

Our first ninja rule in every file was to rebuild the master ninja build file. I think this caused the following: image I'm pretty sure that ninja does not expect or handle the build file changing while it is executing it? Ninjas job output "[jobs_complete/total_jobs]" for me seemed to be one less than the number of build statements in the file (for doing a single design). Anyway, I think once the build file was rewritten, ninja starts the build count over again. Also, sometimes it replaces the current line, so you do not notice that it is happening, and sometimes it creates a new line like shown in the image.

reillymck commented 5 months ago

Everything done by these lines in the build.ninja file is done before ninja is ran here

reillymck commented 5 months ago

Fails unittests because there is now one less build statement for every ninja file. But I notice that the unittest specifically checks for the configure rule. I see that the rule is marked as a generator, which means ninja re-invokes itself. So I think this is actually a feature, but I'm not sure why.