forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make landmines work on local builds too
Moves (some of) gyp environment setup out of gyp_chromium into separate module, and shares that between gyp_chromium and landmines.py. landmines.py is added as the first entry in DEPS hooks so that it can clobber the entire build directory before running other hooks that extract/generate into the build dir. Reland with fix for ios, and for clean pull. R=iannucci@chromium.org BUG=400011 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289099 Review URL: https://codereview.chromium.org/457003004 Cr-Commit-Position: refs/heads/master@{#289546} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289546 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
scottmg@chromium.org
committed
Aug 14, 2014
1 parent
1584794
commit 9372bec
Showing
7 changed files
with
81 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
.cproject | ||
.gdb_history | ||
.gdbinit | ||
.landmines | ||
.metadata | ||
.project | ||
.pydevproject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
""" | ||
Sets up various automatic gyp environment variables. These are used by | ||
gyp_chromium and landmines.py which run at different stages of runhooks. To | ||
make sure settings are consistent between them, all setup should happen here. | ||
""" | ||
|
||
import gyp_helper | ||
import os | ||
import sys | ||
import vs_toolchain | ||
|
||
def SetEnvironment(): | ||
"""Sets defaults for GYP_* variables.""" | ||
gyp_helper.apply_chromium_gyp_env() | ||
|
||
# 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. | ||
# . -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', 'win', 'freebsd')) and \ | ||
not os.environ.get('GYP_GENERATORS'): | ||
os.environ['GYP_GENERATORS'] = 'ninja' | ||
elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ | ||
not 'OS=ios' in os.environ.get('GYP_DEFINES', []): | ||
os.environ['GYP_GENERATORS'] = 'ninja' | ||
|
||
vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters