diff options
author | YRabbit <rabbit@yrabbit.cyou> | 2022-12-21 16:13:08 +1000 |
---|---|---|
committer | YRabbit <rabbit@yrabbit.cyou> | 2022-12-21 16:13:08 +1000 |
commit | d6cbe4b7f83a083ac174d7f8b0dd26eca61ebe53 (patch) | |
tree | ca5cfbeec3e265a7c43654af2089399a020f1cff /gowin/arch.cc | |
parent | 3ea3a931ca2b9b7228bf241a3fd6cbf861e40696 (diff) | |
download | nextpnr-d6cbe4b7f83a083ac174d7f8b0dd26eca61ebe53.tar.gz nextpnr-d6cbe4b7f83a083ac174d7f8b0dd26eca61ebe53.tar.bz2 nextpnr-d6cbe4b7f83a083ac174d7f8b0dd26eca61ebe53.zip |
gowin: fix build for wasm
A large number of global variables are not suitable for WASM, so
completely disable the graphics part where the main array of them is
used. For other architectures GUI is still possible.
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Diffstat (limited to 'gowin/arch.cc')
-rw-r--r-- | gowin/arch.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gowin/arch.cc b/gowin/arch.cc index 461b64c8..8c908b04 100644 --- a/gowin/arch.cc +++ b/gowin/arch.cc @@ -523,6 +523,7 @@ void Arch::setBelDecal(BelId bel, DecalXY active, DecalXY inactive) void Arch::setDefaultDecals(void) { +#ifndef NO_GUI for (BelId bel : getBels()) { gfxSetBelDefaultDecal(this, bel_info(bel)); } @@ -533,6 +534,7 @@ void Arch::setDefaultDecals(void) gfxSetWireDefaultDecal(this, wire_info(wire)); } fixClockSpineDecals(); +#endif } void Arch::setGroupDecal(GroupId group, DecalXY decalxy) @@ -1125,8 +1127,10 @@ Arch::Arch(ArchArgs args) : args(args) addDecalGraphic(IdString(), GraphicElement()); if (args.gui) { +#ifndef NO_GUI // decals gfxCreateBelDecals(this); +#endif } // setup package @@ -1216,11 +1220,13 @@ Arch::Arch(ArchArgs args) : args(args) int col = i % db->cols; const TilePOD *tile = db->grid[i].get(); if (args.gui) { +#ifndef NO_GUI // CRU decal snprintf(buf, 32, "R%dC%d_CRU", row + 1, col + 1); grpname = id(buf); addGroup(grpname); setGroupDecal(grpname, gfxGetCruGroupDecalXY(col, row)); +#endif } // setup wires const PairPOD *pips[2] = {tile->pips.get(), tile->clock_pips.get()}; @@ -1420,8 +1426,10 @@ Arch::Arch(ArchArgs args) : args(args) snprintf(buf, 32, "R%dC%d_LUT_GRP%d", row + 1, col + 1, z); grpname = id(buf); if (args.gui) { +#ifndef NO_GUI addGroup(grpname); setGroupDecal(grpname, gfxGetLutGroupDecalXY(col, row, z >> 1)); +#endif } } break; |