haskell-game / dear-imgui.hs

Haskell bindings to Dear ImGui, an immediate mode GUI toolkit
BSD 3-Clause "New" or "Revised" License
142 stars 31 forks source link

Added compiler flags stanzas. #105

Closed jpwidera closed 3 years ago

jpwidera commented 3 years ago

Implements #104 (Thanks to @dpwiz for the Common Stanzas tip)

Added debug mode (eg. cabal run -f debug image).

  1. For normal compiling increased the optimiaztion level to O2
  2. Tested only for Linux
  3. MinGW (Windows) does not support address sanitizer. GCC 4.8 and llvm 3.something does - is it ok, to assume newer version?.
  4. Added cxx-flags to the c-flags.
dpwiz commented 3 years ago

Did you test it on Windows?

jpwidera commented 3 years ago

Did you test it on Windows?

No, I just googled the flags for MinGW. I have no experience with GHC+MinGW+SDL on this platform (to be honest, I dodge every window I see, so no exp at all...)

Btw. I don't use any fruit-logo hardware either, so I had to rely on llvm - ubiquitness across platforms.

ocharles commented 3 years ago

I think we should avoid commiting things we haven't tested, so maybe just drop windows from this if we don't have a way to verify.

dpwiz commented 3 years ago

I can check this out a bit later. Got nothing on Macs though.

bflyblue commented 3 years ago

I've tested this on windows (using ghc 8.10.7 that I installed using Chocolatey) and it works fine.