{{ message }}
Fix RISC-V compilation without RVV#2637
Merged
lemire merged 1 commit intosimdjson:masterfrom Mar 20, 2026
Merged
Conversation
simdjson#2617 introduced an RVV check that only checks if the compiler supports RVV intrinsics without checking if RVV is enabled at compile time. This has caused compilation failure of node.js on riscv64. Fix it by appending a check for __riscv_vector.
kxxt
added a commit
to kxxt/archriscv-packages
that referenced
this pull request
Mar 20, 2026
Fix rvv check. Upstream PR: simdjson/simdjson#2637
kxxt
added a commit
to kxxt/archriscv-packages
that referenced
this pull request
Mar 20, 2026
Fix rvv check. Upstream PR: simdjson/simdjson#2637
felixonmars
pushed a commit
to felixonmars/archriscv-packages
that referenced
this pull request
Mar 20, 2026
Fix rvv check. Upstream PR: simdjson/simdjson#2637
lemire
reviewed
Mar 20, 2026
Member
There was a problem hiding this comment.
I am trying to understand here... The compiler would set __riscv_v_intrinsic to a value greater or equal to 11000 but without enabling RVV?
Here is what ChatGPT is telling me:
The macro
__riscv_v_intrinsicis a feature-test macro used by compilers (GCC/Clang) to indicate that the RISC-V Vector intrinsics API is available.
Now why would the RISC-V Vector intrinsics API be enabled if RISC-V Vector is not itself enabled?
Contributor
Author
There was a problem hiding this comment.
This macro is defined even if vector is not enabled, according to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Short title (summary): Fix RISC-V compilation without RVV
Description
Type of change
How to verify / test
-march=rv64gcin CFLAGS.Please read before contributing:
If you can, we recommend running our tests with the sanitizers turned on.
For non-Visual Studio users, it is as easy as doing:
Our CI checks, among other things, for trailing whitespace. If a test fails for that reason,
use the "artifacts" button to download the artifact and inspect the problematic lines,
or run
scripts/remove_trailing_whitespace.shlocally if you have a bash shell andsed.Checklist before submitting
Final notes
Thanks for the contribution!