Target.hpp: Don't return a reference to a static thread-local map in the Target::getTaskMapInstance function
It only worked properly with the "--parallel" flag Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
764f3287ff
commit
f348dc985f
|
@ -124,10 +124,10 @@ protected:
|
|||
string separator;
|
||||
static constexpr const char* indentation = " ";
|
||||
public:
|
||||
const unordered_task_map& getTaskMapInstance() {
|
||||
static thread_local unordered_task_map staticMap = getTaskMap();
|
||||
unordered_task_map getTaskMapInstance() {
|
||||
unordered_task_map fullMap = getTaskMap();
|
||||
// Default / Shared tasks:
|
||||
staticMap.merge(unordered_task_map({
|
||||
fullMap.merge(unordered_task_map({
|
||||
make_task(ParseTree, transpileTree(parseComponent);),
|
||||
make_task(StandardComponents::Reference, output << parseComponent.name;),
|
||||
make_task(StandardComponents::Call,
|
||||
|
@ -139,7 +139,7 @@ public:
|
|||
),
|
||||
make_task(StandardComponents::types::Integer, output << setprecision(parseComponent.precision) << fixed << parseComponent.value;)
|
||||
}));
|
||||
return staticMap;
|
||||
return fullMap;
|
||||
};
|
||||
static unique_ptr<Target> forName(string_view name, bool newLines);
|
||||
string transpileWithTree(const ParseTree& tree) {
|
||||
|
|
Loading…
Reference in New Issue