OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2012 the V8 project authors. All rights reserved. | 3 # Copyright 2012 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 for arg in args: | 83 for arg in args: |
84 if arg.startswith('-I') and len(arg) > 2: | 84 if arg.startswith('-I') and len(arg) > 2: |
85 specified_includes.add(os.path.realpath(arg[2:])) | 85 specified_includes.add(os.path.realpath(arg[2:])) |
86 | 86 |
87 result = [] | 87 result = [] |
88 def AddInclude(path): | 88 def AddInclude(path): |
89 if os.path.realpath(path) not in specified_includes: | 89 if os.path.realpath(path) not in specified_includes: |
90 result.append(path) | 90 result.append(path) |
91 | 91 |
92 # Always include standalone.gypi | 92 # Always include standalone.gypi |
93 AddInclude(os.path.join(v8_root, 'build', 'standalone.gypi')) | 93 AddInclude(os.path.join(v8_root, 'gypfiles', 'standalone.gypi')) |
94 | 94 |
95 # Optionally add supplemental .gypi files if present. | 95 # Optionally add supplemental .gypi files if present. |
96 supplements = glob.glob(os.path.join(v8_root, '*', 'supplement.gypi')) | 96 supplements = glob.glob(os.path.join(v8_root, '*', 'supplement.gypi')) |
97 for supplement in supplements: | 97 for supplement in supplements: |
98 AddInclude(supplement) | 98 AddInclude(supplement) |
99 | 99 |
100 return result | 100 return result |
101 | 101 |
102 | 102 |
103 def run_gyp(args): | 103 def run_gyp(args): |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 gyp_defines = os.environ.get('GYP_DEFINES', '') | 173 gyp_defines = os.environ.get('GYP_DEFINES', '') |
174 | 174 |
175 # Automatically turn on crosscompile support for platforms that need it. | 175 # Automatically turn on crosscompile support for platforms that need it. |
176 if all(('ninja' in gyp_generators, | 176 if all(('ninja' in gyp_generators, |
177 'OS=android' in gyp_defines, | 177 'OS=android' in gyp_defines, |
178 'GYP_CROSSCOMPILE' not in os.environ)): | 178 'GYP_CROSSCOMPILE' not in os.environ)): |
179 os.environ['GYP_CROSSCOMPILE'] = '1' | 179 os.environ['GYP_CROSSCOMPILE'] = '1' |
180 | 180 |
181 run_gyp(gyp_args) | 181 run_gyp(gyp_args) |
OLD | NEW |