Always generate tables for current (blocks,teeth) config

This commit is contained in:
Pieter Wuille committed 2024-04-19 11:43:26 -04:00
1 parent fde1dfcd8d
commit 5f7be9f6a5
1 file changed
+7
+7
View File
@@ -53,6 +53,7 @@ int main(int argc, char **argv) {
const char outfile[] = "src/precomputed_ecmult_gen.c";
FILE* fp;
size_t config;
int did_current_config = 0;
(void)argc;
(void)argv;
@@ -77,6 +78,12 @@ int main(int argc, char **argv) {
fprintf(fp, "#if 0\n");
for (config = 0; config < sizeof(CONFIGS) / sizeof(*CONFIGS); ++config) {
print_table(fp, CONFIGS[config][0], CONFIGS[config][1]);
if (CONFIGS[config][0] == COMB_BLOCKS && CONFIGS[config][1] == COMB_TEETH) {
did_current_config = 1;
}
}
if (!did_current_config) {
print_table(fp, COMB_BLOCKS, COMB_TEETH);
}
fprintf(fp, "#else\n");
fprintf(fp, "# error Configuration mismatch, invalid COMB_* parameters. Try deleting precomputed_ecmult_gen.c before the build.\n");