forked from v8/v8
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Prerequisite: you are on a up-to-date x86_64 linux environment.
- download riscv32 gnu gcc toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2022.06.10/riscv32-glibc-ubuntu-20.04-nightly-2022.06.10-nightly.tar.gz, then extract them to
/opt/riscv/. Your/opt/riscvshould look like this (ignore theriscv64-unknow-linux-gnuentry, it's present because I also installed the gnu gcc riscv64 toolchain):

cdto your v8 directory, thencd build. Thebuilddirectory contains toolchain configurations for building v8. Download this patch from @luyahan: https://gist.github.com/VitalyAnkh/6e064ab3dcdf1be1032111bc8fa61acb. Thengit apply <path-to-the-patch>.- Edit
v8/build/config/riscv.gni, assign values toriscv_gcc_toolchain_pathandriscv_sysroot, like this

cdto your v8 directory, rungn gen out/riscv32.native.debug --args='is_component_build=false is_debug=true target_cpu="riscv32" v8_target_cpu="riscv32" use_goma=false goma_dir="None" treat_warnings_as_errors=false is_clang=false', thenninja -C out/riscv32.native.debug -j12.
Enjoy hacking!
Metadata
Metadata
Assignees
Labels
No labels