V8 Build System questions

36 views
Skip to first unread message

alex.s...@gmail.com

unread,
Sep 6, 2019, 3:00:56 PM9/6/19
to v8-dev
I have a couple of questions relating to the current build system (GN with the GM.py wrapper) used for V8.

* Why was the decision made to switch from GYP to GN?
* Why was GN chosen over other build systems, such as Google's own Bazel?
* How smooth was the transition?
* What are some of the unique use cases of V8 that GN/GM handle?
* What are all the requirements a new build system would have to have before the V8 team would consider porting to a new build system?

I'm currently studying differences in build systems (just for my own curiosity), and I wanted to get a sorta 'behind-the-scenes' look at the build system of a very large software project like V8.

Thanks.

Michael Hablich

unread,
Sep 9, 2019, 4:02:17 AM9/9/19
to v8-dev
Hi Alex,

some answers inline below.

Cheers,
Michael


On Friday, September 6, 2019 at 9:00:56 PM UTC+2, alex....@gmail.com wrote:
I have a couple of questions relating to the current build system (GN with the GM.py wrapper) used for V8.

* Why was the decision made to switch from GYP to GN?
Chromium did switch to GN. As V8 is heavily using Chromium's infrastructure, we simply needed to switch too. 
* Why was GN chosen over other build systems, such as Google's own Bazel?
You should ask this question on chromi...@chromium.org or similar. 

Yang Guo

unread,
Sep 9, 2019, 4:29:36 AM9/9/19
to v8-...@googlegroups.com
Some more comments

On Mon, Sep 9, 2019 at 10:02 AM Michael Hablich <hab...@chromium.org> wrote:
Hi Alex,

some answers inline below.

Cheers,
Michael

On Friday, September 6, 2019 at 9:00:56 PM UTC+2, alex....@gmail.com wrote:
I have a couple of questions relating to the current build system (GN with the GM.py wrapper) used for V8.

* Why was the decision made to switch from GYP to GN?
Chromium did switch to GN. As V8 is heavily using Chromium's infrastructure, we simply needed to switch too. 

Chromium is also the most important user of V8. V8 follows what Chromium uses wrt build systems.
 
* Why was GN chosen over other build systems, such as Google's own Bazel?
You should ask this question on chromi...@chromium.org or similar. 

Bazel did not support a Windows build at that time. There are some other smaller requirements that it did not meet either, I think.
 
* How smooth was the transition?

We had the gyp and GN build side-by-side for about two years. Most people working on V8 were not affected.
 
* What are some of the unique use cases of V8 that GN/GM handle?

I think we moved from gyp to GN mostly because of performance.
 
* What are all the requirements a new build system would have to have before the V8 team would consider porting to a new build system?

It should support the Node.js use case, be portable to many platforms, support cross-compilation, be fast, make heavy use of parallelization.
 

I'm currently studying differences in build systems (just for my own curiosity), and I wanted to get a sorta 'behind-the-scenes' look at the build system of a very large software project like V8.

Thanks.

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/865d0a00-ffde-4ead-9166-bcd9af0387e0%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages