-
Notifications
You must be signed in to change notification settings - Fork 31
Simulator Build
This page describes how to build V8 for execution on the built-in RISC-V simulator. It is assumed that you have already followed the steps to get the source.
- Install prerequisites
- Build v8 for RISC-V Simulation of an x86-64 Host
- Build v8 Release Simulated Build
Table of contents generated with markdown-toc
The following script will use apt to install any packages required for building v8. You will need sudo access to install the packages.
cd $V8_ROOT/v8
./build/install-build-deps.shThe following commands build an x86-64 executable for v8 which generates RISC-V code and executes it within a builtin RISC-V simulator. We use gn to configure the build as such:
gn gen out/riscv64.sim --args='is_component_build=false is_debug=true target_cpu="x64" v8_target_cpu="riscv64" use_goma=false goma_dir="None"'If you plan to use gdb to debug v8, it will be useful to add the flag v8_optimized_debug=false to the arguments. Without this, the code is optimized by default and will be difficult to debug.
Next, we use ninja to complete the build:
ninja -C out/riscv64.sim -j8Note, -j8 specifies to use 8 cores for the build and should be adjusted for your build machine.
Next, continue to Run Tests
To only compile the release build (note: this only builds d8 but none of the test binaries):
tools/dev/gm.py riscv64.releaseTo compile and immediately run tests of the release build:
tools/dev/gm.py riscv64.release.check- Home
- Getting Started
- Project Management
- For Developers
- RISC-V Backend Design Doc
- Community operation