OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This file helps gyp_chromium and landmines correctly set up the gyp | 5 # This file helps gyp_chromium and landmines correctly set up the gyp |
6 # environment from chromium.gyp_env on disk | 6 # environment from chromium.gyp_env on disk |
7 | 7 |
8 import os | 8 import os |
9 | 9 |
10 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) | 10 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) |
(...skipping 13 matching lines...) Expand all Loading... |
24 raise | 24 raise |
25 supported_vars = ( | 25 supported_vars = ( |
26 'CC', | 26 'CC', |
27 'CC_wrapper', | 27 'CC_wrapper', |
28 'CHROMIUM_GYP_FILE', | 28 'CHROMIUM_GYP_FILE', |
29 'CHROMIUM_GYP_SYNTAX_CHECK', | 29 'CHROMIUM_GYP_SYNTAX_CHECK', |
30 'CXX', | 30 'CXX', |
31 'CXX_wrapper', | 31 'CXX_wrapper', |
32 'GYP_DEFINES', | 32 'GYP_DEFINES', |
33 'GYP_GENERATOR_FLAGS', | 33 'GYP_GENERATOR_FLAGS', |
| 34 'GYP_CROSSCOMPILE', |
34 'GYP_GENERATOR_OUTPUT', | 35 'GYP_GENERATOR_OUTPUT', |
35 'GYP_GENERATORS', | 36 'GYP_GENERATORS', |
36 ) | 37 ) |
37 for var in supported_vars: | 38 for var in supported_vars: |
38 file_val = file_data.get(var) | 39 file_val = file_data.get(var) |
39 if file_val: | 40 if file_val: |
40 if var in os.environ: | 41 if var in os.environ: |
41 print 'INFO: Environment value for "%s" overrides value in %s.' % ( | 42 print 'INFO: Environment value for "%s" overrides value in %s.' % ( |
42 var, os.path.abspath(file_path) | 43 var, os.path.abspath(file_path) |
43 ) | 44 ) |
44 else: | 45 else: |
45 os.environ[var] = file_val | 46 os.environ[var] = file_val |
46 | 47 |
47 | 48 |
48 def apply_chromium_gyp_env(): | 49 def apply_chromium_gyp_env(): |
49 if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ: | 50 if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ: |
50 # Update the environment based on chromium.gyp_env | 51 # Update the environment based on chromium.gyp_env |
51 path = os.path.join(os.path.dirname(CHROME_SRC), 'chromium.gyp_env') | 52 path = os.path.join(os.path.dirname(CHROME_SRC), 'chromium.gyp_env') |
52 apply_gyp_environment_from_file(path) | 53 apply_gyp_environment_from_file(path) |
OLD | NEW |