tweag / asterius

DEPRECATED in favor of ghc wasm backend, see https://www.tweag.io/blog/2022-11-22-wasm-backend-merged-in-ghc
1.98k stars 55 forks source link

Fix stage confusion in ghc-lib-asterius #869

Closed TerrorJack closed 2 years ago

TerrorJack commented 2 years ago

Our previous logic of generating ghc-asterius package sources incorrectly bundles the _build/stage1 auto-generated files, which is wrong regarding cross compilation. Stage distinction is of grave importance when we switch to cross compilation mode, with differing word sizes for host/target platform.

The current logic fixes that, and it works for wasm32-unknown-wasi too.

Other fixes that sneaked in: