I used gm to try and build V8, but it ran the command to build d8 when invoking Ninja

29 views
Skip to first unread message

Osman Zakir

unread,
May 26, 2019, 2:03:24 PM5/26/19
to v8-dev
I ran the gm script to build V8, but this is what I got:

python tools/dev/gm.py x64.release
# mkdir -p out\x64.release
# echo > out\x64.release\args.gn << EOF
is_component_build = false
is_debug = false
target_cpu = "x64"
use_goma = false
goma_dir = "None"
v8_enable_backtrace = true
v8_enable_disassembler = true
v8_enable_object_print = true
v8_enable_verify_heap = true
EOF
# gn gen out\x64.release
Done. Made 133 targets from 78 files in 14747ms
# autoninja -C out\x64.release d8
"E:\depot_tools\ninja.exe" -C out\x64.release d8
Why is it only giving the command to build d8?  Is there no way to make it build everything and also generate not just .obj files but also static .lib files?

When it finished it didn't seem to have built everything, and trying to make it build "build.ninja" also failed because it kept giving an error saying it doesn't know that target.  So I manually listed all of the targets, including "libbase", "mksnapshot" and "torque" which were it'd already built previously.  I need to know if there really isn't a way to make it build everything with just one command.  

Jakob Kummerow

unread,
May 27, 2019, 10:06:14 AM5/27/19
to v8-...@googlegroups.com
On Sun, May 26, 2019 at 8:03 PM Osman Zakir <osman...@gmail.com> wrote:
Why is it only giving the command to build d8? 

Because often that's what developers want, and it saves time not to build everything.
 
Is there no way to make it build everything

Sure there is: "gm x64.release all".

See also "gm help" (or "gm --help" or "gm -h").
 
and also generate not just .obj files but also static .lib files?

That's controlled by args.gn, where gm.py provides a reasonable default, which you can customize to your needs.
For convenient embedding, you may like to set "v8_monolithic = true", and then build the "v8_monolith" target. You'll have to manually use ninja or autoninja for that though, as nobody has bothered to teach gm.py about it.

Reply all
Reply to author
Forward
0 new messages