mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Adds an environment variable that makes generate_buildfiles.py a no-op
R=whesse@google.com Review URL: https://codereview.chromium.org/2507483002 .
This commit is contained in:
parent
fb467ef68a
commit
c172f60bd4
1 changed files with 8 additions and 0 deletions
|
@ -12,12 +12,17 @@ import utils
|
|||
SCRIPT_DIR = os.path.dirname(sys.argv[0])
|
||||
DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
|
||||
DART_USE_GN = "DART_USE_GN"
|
||||
DART_DISABLE_BUILDFILES = "DART_DISABLE_BUILDFILES"
|
||||
|
||||
|
||||
def use_gn():
|
||||
return DART_USE_GN in os.environ
|
||||
|
||||
|
||||
def disable_buildfiles():
|
||||
return DART_DISABLE_BUILDFILES in os.environ
|
||||
|
||||
|
||||
def execute(args):
|
||||
process = subprocess.Popen(args, cwd=DART_ROOT)
|
||||
process.wait()
|
||||
|
@ -68,6 +73,9 @@ def parse_args(args):
|
|||
|
||||
|
||||
def main(argv):
|
||||
# Check the environment and become a no-op if directed.
|
||||
if disable_buildfiles():
|
||||
return 0
|
||||
options = parse_args(argv)
|
||||
if options.gn:
|
||||
return run_gn()
|
||||
|
|
Loading…
Reference in a new issue