summaryrefslogtreecommitdiffstats
path: root/build/gyp_chromium
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-11 03:18:37 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-11 03:18:37 +0000
commitde4c6b2985a4d29c55fabe0cabba8ee69be841b6 (patch)
tree6bde31802cb56a903a293c7805d6ce1b3ef46083 /build/gyp_chromium
parent62be1e83a3580c73f600385382d8f6f6e0cafb7d (diff)
downloadchromium_src-de4c6b2985a4d29c55fabe0cabba8ee69be841b6.zip
chromium_src-de4c6b2985a4d29c55fabe0cabba8ee69be841b6.tar.gz
chromium_src-de4c6b2985a4d29c55fabe0cabba8ee69be841b6.tar.bz2
Let gyp create ninja files by default on linux.
If a generator is set explicitly (via GYP_GENERATORS or via -f or via chromium.gyp_env), it will have precedence over the new default. If you've used make until now, run `ninja -C out/Debug` instead of `make` to build. If you're using goma, go/ma has documentation on how to use goma with ninja. (It's the same as make, except that CC / CXX are now picked up at `gclient sync` / `gclient runhooks` / `build/gyp_chromium` time instead of at build time.) If you can't use ninja for some reason, `export GYP_GENERATORS=make` and sync again. Please also send me (thakis@chromium.org) an email explaining why ninja does not work for you. This will also switch all bots that don't explicitly set a build tool (including the public bots). compile.py will use ninja instead or make based on if build.ninja or Makefile are newer, so they should build the right thing automatically. And since built products end up in the same place, packaging should do the right thing too. BUG=239257 R=mark@chromium.org Review URL: https://codereview.chromium.org/15100009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/gyp_chromium')
-rwxr-xr-xbuild/gyp_chromium7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/gyp_chromium b/build/gyp_chromium
index f00694a..0cbb8ce 100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -135,6 +135,13 @@ if __name__ == '__main__':
if sys.platform not in ('darwin',):
args.append('--no-circular-check')
+ # Default to ninja on linux, but only if no generator has explicitly been set.
+ # . -f / --format has precedence over the env var, no need to check for it
+ # . set the env var only if it hasn't been set yet
+ # . chromium.gyp_env has been applied to os.environ at this point already
+ if sys.platform.startswith('linux') and not os.environ.get('GYP_GENERATORS'):
+ os.environ['GYP_GENERATORS'] = 'ninja'
+
# If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check
# to enfore syntax checking.
syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')