Creating this to document a bug I discovered and have now fixed.
The issue is that we were passing in --ghc-options to Cabal, even when using ghcjs. Cabal will accept --ghc-options even when doing a build with ghcjs. Turns out we need to pass --ghcjs-options instead for them to actually get passed along to the compiler.
Fix use of --ghc-options with GHCJS #2714
Great! So this can be closed?