forked from v8/v8
-
Notifications
You must be signed in to change notification settings - Fork 31
Simulator Build
Peng Wu edited this page Jul 17, 2020
·
9 revisions
This page describes how to build V8 for execution on the built-in RISC-V simulator.
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.
- Home
- Getting Started
- Project Management
- For Developers
- RISC-V Backend Design Doc
- Community operation