Commit 87518c38 authored by scottmg@chromium.org's avatar scottmg@chromium.org

win: Use ninja by default

With this change, `gclient runhooks` creates ninja files by default on
Windows. To build, run `ninja -C out\Release chrome`. The output appears
in out\ instead of build\.

If you need to use a VS build for some reason, you can still
`set GYP_GENERATORS=msvs`. This is no longer a tested configuration.

Bots should automatically pick up the binaries in the new location (out).
If something does break, it should be safe to revert this change, and bots
should then automatically go back to picking up binaries from the old
location (build).

R=thakis@chromium.org
BUG=303291

Review URL: https://codereview.chromium.org/111183004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243782 0039d316-1c4b-4281-b951-d872f2087c98
parent d6bbe40d
...@@ -324,13 +324,16 @@ if __name__ == '__main__': ...@@ -324,13 +324,16 @@ if __name__ == '__main__':
if sys.platform not in ('darwin',): if sys.platform not in ('darwin',):
args.append('--no-circular-check') args.append('--no-circular-check')
# Default to ninja on linux, but only if no generator has explicitly been set. # Default to ninja on linux and windows, but only if no generator has
# explicitly been set.
# Also default to ninja on mac, but only when not building chrome/ios. # Also default to ninja on mac, but only when not building chrome/ios.
# . -f / --format has precedence over the env var, no need to check for it # . -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 # . 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 # . 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'): if sys.platform.startswith('linux') and not os.environ.get('GYP_GENERATORS'):
os.environ['GYP_GENERATORS'] = 'ninja' os.environ['GYP_GENERATORS'] = 'ninja'
if sys.platform.startswith('win') and not os.environ.get('GYP_GENERATORS'):
os.environ['GYP_GENERATORS'] = 'ninja'
elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \
not 'OS=ios' in os.environ.get('GYP_DEFINES', []): not 'OS=ios' in os.environ.get('GYP_DEFINES', []):
os.environ['GYP_GENERATORS'] = 'ninja' os.environ['GYP_GENERATORS'] = 'ninja'
......
...@@ -105,7 +105,7 @@ def builder(): ...@@ -105,7 +105,7 @@ def builder():
elif platform() == 'ios': elif platform() == 'ios':
return 'xcode' return 'xcode'
elif IsWindows(): elif IsWindows():
return 'msvs' return 'ninja'
elif IsLinux(): elif IsLinux():
return 'ninja' return 'ninja'
elif IsMac(): elif IsMac():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment