mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-05-01 14:05:55 +00:00
Only depend on Abseil in threaded builds.
Abseil has a hard dependency on threads (not just in the build system but in many places in the base libraries), so there is no way to use it on WASI at the moment.
This commit is contained in:
@@ -27,7 +27,9 @@
|
||||
*/
|
||||
|
||||
#include "router2.h"
|
||||
#if !defined(NPNR_DISABLE_THREADS)
|
||||
#include <absl/container/flat_hash_map.h>
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include <boost/container/flat_map.hpp>
|
||||
#include <chrono>
|
||||
@@ -191,7 +193,11 @@ struct Router2
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(NPNR_DISABLE_THREADS)
|
||||
std::unordered_map<WireId, int> wire_to_idx;
|
||||
#else
|
||||
absl::flat_hash_map<WireId, int> wire_to_idx;
|
||||
#endif
|
||||
std::vector<PerWireData> flat_wires;
|
||||
|
||||
PerWireData &wire_data(WireId w) { return flat_wires[wire_to_idx.at(w)]; }
|
||||
|
||||
Reference in New Issue
Block a user