Recognize riscv64 targets in CMake#787
Open
carlosqwqqwq wants to merge 2 commits into
Open
Conversation
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.
Why
c-blosc2 already has generic shuffle and bitshuffle implementations, but its top-level CMake logic still treated
riscv64as an unknown processor and only reported that hardware-accelerated implementations were unavailable. This patch makes the RISC-V target explicit and documents that the build should use the generic path instead of pretending the target is unsupported.What changed
riscv32/riscv64/riscvbranch in the top-level CMake processor detection.Verification
BUILD_TESTS=OFF,BUILD_FUZZERS=OFF,BUILD_BENCHMARKS=OFF,BUILD_EXAMPLES=OFF,BUILD_PLUGINS=OFF,BUILD_SHARED=OFF, andBUILD_STATIC=ON.cmake --build build-codex-native --parallel 4.riscv64CMake configuration withCMAKE_SYSTEM_NAME=Linux,CMAKE_SYSTEM_PROCESSOR=riscv64,CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY, and forced__riscv=1/__riscv_xlen=64because no real RISC-V toolchain is available on the host.riscv64tree successfully withcmake --build build-codex-riscv --parallel 4.riscv64configuration printsDetected RISC-V target; hardware-accelerated shuffle implementations are not available, so the generic path will be used.build-codex-riscv/build.ninja: it does not containshuffle-sse2.c,bitshuffle-sse2.c,shuffle-avx2.c,bitshuffle-avx2.c,bitshuffle-avx512.c,shuffle-neon.c,shuffle-altivec.c,-msse2,-mavx2,-mavx512, orarch/x86sources.Notes
This is a conservative portability patch. It only makes RISC-V target handling explicit and keeps c-blosc2 on its existing generic code path. Verification covers native build stability plus simulated RISC-V configuration and source-selection checks, but not a real riscv64 cross-toolchain build or hardware run.