When I look at asmjs-unknown-emscripten/rust-test-helpers/rust_test_helpers.o
I see an ELF file, but I think it should be javascript.
Edit: I see the fix for this issue needs to go into gcc-rs. Will update a patch.
When I look at asmjs-unknown-emscripten/rust-test-helpers/rust_test_helpers.o
I see an ELF file, but I think it should be javascript.
Edit: I see the fix for this issue needs to go into gcc-rs. Will update a patch.
Hereās the patch to gcc-rs. Once that lands I rustbuild should pick it up and a lot of tests should start to pass.
Edit: Nope, I had to update the lockfile. Iāve done so and pushed a commit to update gcc-rs.
So now Iām going to focus again on ignore-emscriptening tests.
Iām trying to help out (or at least follow along here) but am having trouble getting the test command to build from the right LLVM commit. Iām not seeing where in @jerās instructions he pulls in from LLVM, so I donāt know where to substitute your squashed commits, @brson.
Iām a compiler newbie but would love to help land rust -> wasm!
I published an updated guide using @brsonās fixes here: https://gist.github.com/badboy/5b905e71cf41a83724da9f96ee14b5fe
Re-run with @brsonās gcc fixes: https://gist.github.com/badboy/ead73d46e1f7e6f77d2ffcbd38cfdcd9
Looks like the usual suspects: external processes & packed structs
@jer FYI I think you have an error in your setup gist, second to last line. There is no src/rust
to run that python line in. I assume you mean /src/bootstrap/bootstrap.py
?
Woops, yeah, I mean that. Fixed it in the gist
Iām afraid I accomplished little on emscripten yesterday. Letās think more concretely about how to divide up the work. Iāve updated the wasm issue on the tracker with the tasks.
@jer is there anything particular you want to tackle? Iām thinking a good task for @rschulman would be to get make check
working successfully, just add ignore-emscripten
tags. @rschulman are you interested in doing that?
Run a single set of tests with a command like
python src/bootstrap/bootstrap.py --step check-rpass --target=asmjs-unknown-emscripten
The full set of test āstepsā is:
check-rpass check-rpass-full check-rpass-valgrind check-cfail check-cfail-full check-pfail check-rfail check-rfail-full check-pretty check-pretty-rpass check-pretty-rpass-full check-pretty-rfail check-pretty-rfail-full check-pretty-rpass-valgrind check-mir-opt check-codegen check-codegen-units check-incremental check-ui check-debug-info check-rustdoc check-docs check-rmake check-crate-rustc check-cargotest
Each of these can be run individually while sussing out the errors, then make check
will do the full check. Iām not sure how some of these interact with the emscripten target.
I think that the bootstrap is wrong in the section where it checks git submodules... When running the bootstrap.py
I was getting a message saying that src/bootstrap/lib.rs
was panicking at line 536. Looks like the "*"
on line 531 should be a "+"
. Anyone else seeing that?
I will take a stab at getting the ignore-emscripten
tags in where they belong.
Should I fork @brsonās version and issue PRs against it? Is that the easiest?
Fork rust-lang/rust (just because it's the upstream). But yes submit PR's to my repo, emscripten-new branch.
I have not seen that, but the code does look wrong in the way you describe. Strange. You might submit a PR to rust-lang/rust for that.
Looks like someone already fixed it upstream.
@rschulman How is it going? On Friday it sounded like you had made quite some progress, discovering that rustbuild needed to be hacked up a bit for the std/core tests.
Do you mind submitting a PR for the progress youāve already made?
@brson, happy to give you a PR with what is done so far.
Would you like me to give you two: one with the ignore-emscripten
additions and one with whatever I have so far on fixing bootstrap
?
Just a single PR is fine!
Alright. Will submit in a few.
I have new files in src/bootstrap/target
which I assume are built by bootstrap and shouldnāt be included in the PR?
@rschulman Yes, thatās right. Usually that folder doesnāt exist, though perhaps itās created if you run cargo directly in src/bootstrap
.
Iāve merged @rschulmanās fixes to the test suite into my emscripten-new branch. Thanks @rschulman!
It sounds like there are still failing tests in stdtest, like those that spawn threads. These can similarly have cfg_attr(target_os = "emscripten", ignore)
attributes. @rschulman is going to look into those as well, but doesnāt have a great deal of time this week.
Once --step check-target --target=asmjs-unknown-emscripten
passes (with lots of ignored test cases if necessary) we can get PRs into rust-lang/rust. Iād like to do that by the end of this week, though friday/saturday is rustconf so itās going to be difficult.