clash-lang / clash-compiler

Haskell to VHDL/Verilog/SystemVerilog compiler
https://clash-lang.org/
Other
1.42k stars 151 forks source link

Detect and throw error on "broken" GHCs #2711

Closed martijnbastiaan closed 2 months ago

martijnbastiaan commented 5 months ago

We know some GHC versions interact poorly with Clash on some platforms. Rather than making everyone hunt down the right tickets on their own, this patch makes Clash emit a fat warning error. Because these issues don't completely prevent Clash from working, we allow users to bypass the error by passing a flag -fclash-ignore-broken-ghcs.

Still TODO:

leonschoorl commented 2 months ago

We have some special handling of certain flags with respect to HDL caching over here. It might be nice to add this option there too, so adding a -fclash-ignore-broken-ghcs doesn't invalidate the HDL cache. And assuming that the code path producing the "broken ghc error" is way before HDL generation, even removing -fclash-ignore-broken-ghcs doesn't have to invalidate the cache.

martijnbastiaan commented 2 months ago

@DigitalBrains1 @leonschoorl Done.