Port stdarch-gen-loongarch to stdarch-gen-common harness#2178
Conversation
| STDARCH_GEN_MODE: check | ||
| run: | | ||
| cargo run --bin=stdarch-gen-loongarch --release -- crates/stdarch-gen-loongarch/lsx.spec | ||
| cargo run -p stdarch-gen-loongarch --release -- lsx |
There was a problem hiding this comment.
Ultimately, this will still be a bit annoying to replicate in bootstrap, as we have to ensure that we invoke both the right crates, and with the right arguments.
That is not for this PR, but I'd think about merging everything into a single binary that will generate everything, I think that would be easier to work with.
| @@ -1,5 +1,5 @@ | |||
| // This code is automatically generated. DO NOT MODIFY. | |||
| // See crates/stdarch-gen-loongarch/README.md | |||
| // This code is automatically generated. DO NOT MODIFY. | |||
There was a problem hiding this comment.
Since the tests.rs files are not generated using the stdarch-gen-common machinery, let's use a different header for them, to avoid this line moving hack.
By the way, if you regenerate the Loongarch tests.rs files now, are they the same as they committed versions?
There was a problem hiding this comment.
Added a different header . As for regenerating the tests.rs i haven't actually run it. Thank you!
|
cc @heiher |
This PR ports
stdarch-gen-loongarchtostdarch-gen-commonharness.The change in
maininvokesrun_generatoronce per committed dir when called with no args orlsx/lasx.The CI switches from
-- <spec>to-- lsx/-- lasxwithSTDARCH_GEN_MODE=check.Swapped the first two comment lines of
lsx/tests.rsandlasx/tests.rsso the auto-generated marker moves to line 2 . Sodiscover_ownedonly checks the first line and makes the harness skiptests.rswhich is not produced bystdarch-gen-loongarch.r? @folkertdev