Fix libsnark dependency build.

This changes libsnark to build in-place, instead of copying first to
a build directory. Previously, modifications made to the original
sources wouldn't get rebuilt without a 'make clean' because users
would be pointing to the copies.

This closes #2689.
This commit is contained in:
syd
2017-11-24 13:54:17 -05:00
parent 7888624f74
commit a55c186a74
119 changed files with 114 additions and 119 deletions

View File

@@ -0,0 +1,48 @@
/** @file
*****************************************************************************
Implementation of interfaces for profiling constraints.
See constraint_profiling.hpp .
*****************************************************************************
* @author This file is part of libsnark, developed by SCIPR Lab
* and contributors (see AUTHORS).
* @copyright MIT license (see LICENSE file)
*****************************************************************************/
#include "gadgetlib1/constraint_profiling.hpp"
#include "common/profiling.hpp"
namespace libsnark {
size_t constraint_profiling_indent = 0;
std::vector<constraint_profiling_entry> constraint_profiling_table;
size_t PRINT_CONSTRAINT_PROFILING()
{
size_t accounted = 0;
print_indent();
printf("Constraint profiling:\n");
for (constraint_profiling_entry &ent : constraint_profiling_table)
{
if (ent.indent == 0)
{
accounted += ent.count;
}
print_indent();
for (size_t i = 0; i < ent.indent; ++i)
{
printf(" ");
}
printf("* Number of constraints in [%s]: %zu\n", ent.annotation.c_str(), ent.count);
}
constraint_profiling_table.clear();
constraint_profiling_indent = 0;
return accounted;
}
}