This commit is contained in:
Félix Baylac Jacqué 2021-09-07 18:24:34 +02:00
parent 6678e98411
commit 66004512bf
2 changed files with 9 additions and 0 deletions

View File

@ -939,6 +939,10 @@ void EvalState::resetFileCache()
void EvalState::eval(Expr * e, Value & v)
{
auto sayHello = evalSettings.generateCallgraph;
if(sayHello) {
std::cout << "hello here?" << std::endl;
}
e->eval(*this, baseEnv, v);
}

View File

@ -445,6 +445,11 @@ struct EvalSettings : Config
Setting<bool> useEvalCache{this, true, "eval-cache",
"Whether to use the flake evaluation cache."};
Setting<bool> generateCallgraph{this, false, "callgraph-profile",
R"(
TODO write some documentation about that.
)"};
};
extern EvalSettings evalSettings;