-
Notifications
You must be signed in to change notification settings - Fork 14
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
SpiderMonkey CMake package: use alternate artifacts if specified. #90
SpiderMonkey CMake package: use alternate artifacts if specified. #90
Conversation
This depends on a bunch of pending PRs: - Stacked on top of bytecodealliance#89 and bytecodealliance#90 - Pulls in spidermonkey-wasi-embedding artifacts from bytecodealliance/spidermonkey-wasi-embedding#18 (hash updated, but use local checkout variant from bytecodealliance#90 to test before that merges) When built with: ``` $ mkdir build/; cd build/ $ cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_WASM_OPT=OFF -DWEVAL=ON $ make ``` This PR will result in a `starling.wasm`, a prebuilt compilation cache of ICs in `starling-ics.wevalcache` (~1.8MiB), and a `componentize.sh` that takes a `--aot` option. I haven't yet quite worked out how to successfully use componentize.sh, so I can't claim this is end-to-end tested yet, but it is invoking weval successfully and ICs are wevaled at least.
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.
I would somewhat prefer using an env var for this instead of hard-coding a specific path to check. Would you mind looking at how the WPT harness does this and seeing if that kind of setup works for you?
And if it does work, please also update the README
to document this.
When developing StarlingMonkey using an existing SpiderMonkey build with no SM changes, it is very convenient to download and use pre-built artifacts for SM from the CI on `spidermonkey-wasi-embedding`, and we do not want to lose this convenience or approachability. However, when modifying SpiderMonkey itself, it is nearly impossible to do development with the current setup: the debug loop requires merging changes to `gecko-dev` with one PR, updating the hash in `spidermonkey-wasi-embedding` with another PR, getting both merged and waiting for the build in CI before StarlingMonkey can use the new engine. Rather than require a local hack for such cases, this modifies the SpiderMonkey CMake module to recognize a `SPIDERMONKEY_BINARIES` environment variable, and use artifacts there instead. This allows the developer to point this to a local clone of `spidermonkey-wasi-embedding` with a modified `gecko-dev`, rebuilt with `rebuild.sh` as needed. The `README` is updated with details on how to use this.
adacf75
to
d52ef04
Compare
Sure thing, updated! This now takes a (cc @guybedford I think from #81: this check that Till linked above is checking |
This depends on a bunch of pending PRs: - Stacked on top of bytecodealliance#89 and bytecodealliance#90 - Pulls in spidermonkey-wasi-embedding artifacts from bytecodealliance/spidermonkey-wasi-embedding#18 (hash updated, but use local checkout variant from bytecodealliance#90 to test before that merges) When built with: ``` $ mkdir build/; cd build/ $ cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_WASM_OPT=OFF -DWEVAL=ON $ make ``` This PR will result in a `starling.wasm`, a prebuilt compilation cache of ICs in `starling-ics.wevalcache` (~1.8MiB), and a `componentize.sh` that takes a `--aot` option. I haven't yet quite worked out how to successfully use componentize.sh, so I can't claim this is end-to-end tested yet, but it is invoking weval successfully and ICs are wevaled at least.
(Stacked on top of bytecodealliance#90.) When built with: ``` $ mkdir build/; cd build/ $ cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_WASM_OPT=OFF -DWEVAL=ON $ make ``` This PR will result in a `starling.wasm`, a prebuilt compilation cache of ICs in `starling-ics.wevalcache` (~1.8MiB), and a `componentize.sh` that takes a `--aot` option. I haven't yet quite worked out how to successfully use componentize.sh, so I can't claim this is end-to-end tested yet, but it is invoking weval successfully and ICs are wevaled at least.
(Stacked on top of bytecodealliance#90.) When built with: ``` $ mkdir build/; cd build/ $ cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_WASM_OPT=OFF -DWEVAL=ON $ make ``` This PR will result in a `starling.wasm`, a prebuilt compilation cache of ICs in `starling-ics.wevalcache` (~1.8MiB), and a `componentize.sh` that takes a `--aot` option. I haven't yet quite worked out how to successfully use componentize.sh, so I can't claim this is end-to-end tested yet, but it is invoking weval successfully and ICs are wevaled at least.
(Stacked on top of bytecodealliance#90.) When built with: ``` $ mkdir build/; cd build/ $ cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_WASM_OPT=OFF -DWEVAL=ON $ make ``` This PR will result in a `starling.wasm`, a prebuilt compilation cache of ICs in `starling-ics.wevalcache` (~1.8MiB), and a `componentize.sh` that takes a `--aot` option. I haven't yet quite worked out how to successfully use componentize.sh, so I can't claim this is end-to-end tested yet, but it is invoking weval successfully and ICs are wevaled at least.
When developing StarlingMonkey using an existing SpiderMonkey build with no SM changes, it is very convenient to download and use pre-built artifacts for SM from the CI on
spidermonkey-wasi-embedding
, and we do not want to lose this convenience or approachability.However, when modifying SpiderMonkey itself, it is nearly impossible to do development with the current setup: the debug loop requires merging changes to
gecko-dev
with one PR, updating the hash inspidermonkey-wasi-embedding
with another PR, getting both merged and waiting for the build in CI before StarlingMonkey can use the new engine.Rather than require a local hack for such cases, this modifies the SpiderMonkey CMake module to recognize a
SPIDERMONKEY_BINARIES
environment variable, and use artifacts there instead. This allows the developer to point this to a local clone ofspidermonkey-wasi-embedding
with a modifiedgecko-dev
, rebuilt withrebuild.sh
as needed. TheREADME
is updated with details on how to use this.