Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider moving from gyp to gn #6089

Closed
jeisinger opened this issue Apr 6, 2016 · 6 comments
Closed

Consider moving from gyp to gn #6089

jeisinger opened this issue Apr 6, 2016 · 6 comments
Labels
build Issues and PRs related to build files or the CI. feature request Issues that request new features to be added to Node.js.

Comments

@jeisinger
Copy link
Contributor

Chromium started to move from gyp to gn a while ago. Soon, the v8 build will be fully supported on gn. While there's no immediate plan to remove the gyp files right away, gyp itself will become unsupported the less people use it.

Consider planning for moving to gn: https://chromium.googlesource.com/chromium/src/+/master/tools/gn/README.md

@MylesBorins
Copy link
Contributor

/cc @nodejs/build @nodejs/node-gyp

@MylesBorins MylesBorins added the build Issues and PRs related to build files or the CI. label Apr 6, 2016
@mscdex mscdex added the feature request Issues that request new features to be added to Node.js. label Apr 6, 2016
@jbergstroem
Copy link
Member

This has been brought up a few times amongst issues while looking for a gyp replacement. GN in its current state is very tied to the google repo meaning building a standalone is tedious. There's a few attempts you likely can find in gists. I've been doing some attempts at ripping dependencies out in place for libuv and lessening ties to the rest of the google checkout, but since gn is moving in such high pace I don't think this is the way forward.

Here's more info: #133
..and here: nodejs/NG#24

I'll close this -- feel free to continue talking in above (the ng issue).

@jbergstroem
Copy link
Member

@jeisinger
Copy link
Contributor Author

Thanks for the pointers. And yes, the fact that gn is checked into chromium is also a problem for v8 (which we work around by using a checked in gn binary...)

@tojocky
Copy link

tojocky commented Jan 3, 2017

Hi @jbergstroem ,

It is easy to build gn standalone.
here is a shell script that I'm using:

#!/bin/bash

set -e
set -v

# Get the sources
mkdir gn-standalone
cd gn-standalone
mkdir tools
cd tools
git clone https://chromium.googlesource.com/chromium/src/tools/gn
cd ..
#mkdir -p third_party/libevent
#cd third_party/libevent
#wget --no-check-certificate https://chromium.googlesource.com/chromium/chromium/+archive/master/third_party/libevent.tar.gz
#tar -xvzf libevent.tar.gz
#cd ../..
git clone https://chromium.googlesource.com/chromium/src/base
git clone https://chromium.googlesource.com/chromium/src/build
#git clone https://chromium.googlesource.com/chromium/src/build/config
mkdir testing
cd testing
git clone https://chromium.googlesource.com/chromium/testing/gtest
cd ..

# Build
cd tools/gn
python ./bootstrap/bootstrap.py -s

# At this point, the resulting binary is at:
# gn-standalone/out/Release/gn

@jbergstroem
Copy link
Member

@tojocky thanks; I've also used that snippet. It doesn't really solve the fact that gn is dependent on a lot of third party code bases which makes it less usable in this scenario. You should check out all progress that Fedor has been doing over here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. feature request Issues that request new features to be added to Node.js.
Projects
None yet
Development

No branches or pull requests

5 participants