cranelift-native: Detect RISC-V extensions using /proc/cpuinfo (#6192)
* cranelift-native: Move riscv to separate module * cranelift-native: Read /proc/cpuinfo to parse RISC-V extensions * ci: Add QEMU cpuinfo emulation patch This patch emulates the /proc/cpuinfo interface for RISC-V. This allows us to do feature detection for the RISC-V backend. It has been queued for QEMU 8.1 so we should remove it as soon as that is available. * ci: Enable QEMU RISC-V extensions * cranelift-native: Cleanup ISA string parsing Co-Authored-By: Jamey Sharp <jsharp@fastly.com> * cranelift-native: Rework `/proc/cpuinfo` parsing Co-Authored-By: Jamey Sharp <jsharp@fastly.com> --------- Co-authored-by: Jamey Sharp <jsharp@fastly.com>
This commit is contained in:
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
@@ -393,7 +393,7 @@ jobs:
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ runner.tool_cache }}/qemu
|
||||
key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}
|
||||
key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}-patchcpuinfo
|
||||
if: matrix.target != '' && matrix.os == 'ubuntu-latest'
|
||||
- name: Install cross-compilation tools
|
||||
run: |
|
||||
@@ -426,6 +426,7 @@ jobs:
|
||||
# quickly.
|
||||
curl https://download.qemu.org/qemu-$QEMU_BUILD_VERSION.tar.xz | tar xJf -
|
||||
cd qemu-$QEMU_BUILD_VERSION
|
||||
patch -p1 < $GITHUB_WORKSPACE/ci/qemu-cpuinfo.patch
|
||||
./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache}}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs
|
||||
ninja -C build install
|
||||
touch ${{ runner.tool_cache }}/qemu/built
|
||||
|
||||
Reference in New Issue
Block a user