-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add js-cross
devShell
#169
Conversation
It looks good to me but I'm not a nix user. @doyougnu would you like to review? |
This was previously done to avoid forcing these derivations if we aren't targetting wasi, yet laziness already ensures this.
This introduces a new devShell intended for building the Wasm backend.
This merely injects `--host` and `--target` flags into the recommended `configure` arguments.
FWIW, this is essentially the same as what I am running locally (and was about to PR -- thanks @bgamari for saving me the effort of cleaning my local hacks up!) It may be nice to add some brief documentation to |
cp -Lr ${emscripten}/share/emscripten/cache .emscripten_cache | ||
chmod u+rwX -R .emscripten_cache | ||
export EM_CACHE=.emscripten_cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah we should replace these three lines because they are a hack. The problem is that this code never cleans up the .emscripten_cache
so the file system gets littered with duplicates after a while.
This should work:
cp -Lr ${emscripten}/share/emscripten/cache .emscripten_cache | |
chmod u+rwX -R .emscripten_cache | |
export EM_CACHE=.emscripten_cache | |
export EM_CACHE=$(mktemp -d) |
For the record that comes from the preconfigure phase of ghcjs in Haskell.nix.
Should #166 be merged first? PRs seem to overlap a bit! |
BTW - CI pipelines for new targets are always highly appreciated ;) They are free for open source projects at GitHub and they ensure we're not accidentally breaking your use case. You may e.g. start by copying and adjusting https://github.com/alpmestan/ghc.nix/blob/master/.github/workflows/ci.yml . |
Indeed I think that would be best. |
@bgamari do you want to clean this up and rebase or may I perhaps take this over? Thanks in advance :) |
Oops, I didn't see this before I opened #175 ! |
I only tested my patch with |
As suggested by @doyougnu on alpmestan#169.
As suggested by @doyougnu on alpmestan#169.
I've continued in #176 . |
Closing in favor of #176. |
This adds a convenient
devShell
for bringing up an environment for building a JS backend cross-compiler.