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 25 matching lines...) Expand all Loading... |
36 import os | 36 import os |
37 import platform | 37 import platform |
38 import shlex | 38 import shlex |
39 import subprocess | 39 import subprocess |
40 import sys | 40 import sys |
41 import vs_toolchain | 41 import vs_toolchain |
42 | 42 |
43 script_dir = os.path.dirname(os.path.realpath(__file__)) | 43 script_dir = os.path.dirname(os.path.realpath(__file__)) |
44 v8_root = os.path.abspath(os.path.join(script_dir, os.pardir)) | 44 v8_root = os.path.abspath(os.path.join(script_dir, os.pardir)) |
45 | 45 |
46 sys.path.insert(0, os.path.join(v8_root, 'build', 'gyp', 'pylib')) | 46 sys.path.insert(0, os.path.join(v8_root, 'tools', 'gyp', 'pylib')) |
47 import gyp | 47 import gyp |
48 | 48 |
49 # Add paths so that pymod_do_main(...) can import files. | 49 # Add paths so that pymod_do_main(...) can import files. |
50 sys.path.insert( | 50 sys.path.insert( |
51 1, os.path.abspath(os.path.join(v8_root, 'tools', 'generate_shim_headers'))) | 51 1, os.path.abspath(os.path.join(v8_root, 'tools', 'generate_shim_headers'))) |
52 | 52 |
53 | 53 |
54 def GetOutputDirectory(): | 54 def GetOutputDirectory(): |
55 """Returns the output directory that GYP will use.""" | 55 """Returns the output directory that GYP will use.""" |
56 | 56 |
(...skipping 115 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 |