Allow atblgen to process sequence_order.in with empty lines in between lines for building on Macos
#1850
+48
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes building on macos due to a kinda specific issue with Apple clang.
The issue
When trying to build on Macos (specifically MacOS 12, Monteray with Apple clang 13.0.0 (clang-1300.0.29.30), idk if other versions have this issue too)
makestops with the following error fromatblgen:atblgenmakes the assumption that thesequence_order.infile has no extra data, spaces, empty lines, etc. but the file somehow ends up having empty lines between each line on macos.This file is created by using the C preprocessor to process
include/tables/sequence_table.h.In normal circumstances this file should look like this snip,
but it ends up looking like this instead
which
atblgendoesn't like.I believe this happens because there are lines with comments between each macro in
sequence_table.hand for some reason this Apple clang version decided to preserve those empty linesThe fix
The fix just makes
atblgenskip empty lines.Misc
I threw
atblgento valgrind to check the fix was working as intended and noted a bunch of memory leaks, so I fixed them.I also noted the tools/audio makefile was not using
OPTFLAGSwhen building those tools, so I fixed that too.