Simplify and speedup compilation database generation#4823
Simplify and speedup compilation database generation#4823Repiteo wants to merge 6 commits intoSCons:masterfrom
Conversation
9b657fd to
cb6b856
Compare
|
Can you give a high level summary of your changes? (But lower than made it faster.. ;) |
|
The most obvious change is the removal of A secondary boost was from only having to create the commandstr actions once-per-variable. The old implementation was effectively doing a lambda call each time it was validating a commandstr, instead of falling back on a cached function. Tertiary changes include making the output file always use Unix eol and UTF-8 encoding, as well as using more modern syntax to make some sections less verbose. Also removed the scanner because it did nothing. It quite literally did nothing. It might've at one point in MongoDB, but it was totally vestigial |
|
I'm a bit slammed at the moment and this will take a deeper dive to review, so please be patient for feedback.. |
|
What happens if your build system has more than one Environment()? Seems like with the global gone, it would only output the information for items built with the current Environment()? |
|
Hmm, that's tricky. On one hand, it'd be convenient to allow multiple compiledb outputs based on the environment that called it. On the other hand, that's very much NOT how the current implementation handles it, and I don't want this PR changing observed functionality I'll go ahead and bring back the global for this PR |
Want to eventually move to a per-environment implementation, but that's beyond the scope of this PR
Gives the compilation database code some TLC, as the previous implementation caused a lot of
--debug=explainoutput bloat. While I think this will always be an expensive action to some extent, here's an anecdotal comparison of the difference I saw from an MSVC build of the Godot Engine that's already been built:The one area I couldn't figure out was making the entries function as a dependency for the compilation database itself, so it's still set to always build.
Contributor Checklist:
CHANGES.txtandRELEASE.txt(and read theREADME.rst).