| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 the V8 project authors. All rights reserved. | 2 # Copyright 2015 the V8 project authors. All rights reserved. |
| 3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import glob | 7 import glob |
| 8 import json | 8 import json |
| 9 import os | 9 import os |
| 10 import pipes | 10 import pipes |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 directory so that even if not system-installed, built binaries are likely to | 229 directory so that even if not system-installed, built binaries are likely to |
| 230 be able to run. | 230 be able to run. |
| 231 | 231 |
| 232 This needs to be run after gyp has been run so that the expected target | 232 This needs to be run after gyp has been run so that the expected target |
| 233 output directories are already created. | 233 output directories are already created. |
| 234 | 234 |
| 235 This is used for the GYP build and gclient runhooks. | 235 This is used for the GYP build and gclient runhooks. |
| 236 """ | 236 """ |
| 237 x86, x64 = runtime_dirs | 237 x86, x64 = runtime_dirs |
| 238 out_debug = os.path.join(output_dir, 'Debug') | 238 out_debug = os.path.join(output_dir, 'Debug') |
| 239 out_debug_nacl64 = os.path.join(output_dir, 'Debug', 'x64') | |
| 240 out_release = os.path.join(output_dir, 'Release') | 239 out_release = os.path.join(output_dir, 'Release') |
| 241 out_release_nacl64 = os.path.join(output_dir, 'Release', 'x64') | |
| 242 out_debug_x64 = os.path.join(output_dir, 'Debug_x64') | 240 out_debug_x64 = os.path.join(output_dir, 'Debug_x64') |
| 243 out_release_x64 = os.path.join(output_dir, 'Release_x64') | 241 out_release_x64 = os.path.join(output_dir, 'Release_x64') |
| 244 | 242 |
| 245 if os.path.exists(out_debug) and not os.path.exists(out_debug_nacl64): | |
| 246 os.makedirs(out_debug_nacl64) | |
| 247 if os.path.exists(out_release) and not os.path.exists(out_release_nacl64): | |
| 248 os.makedirs(out_release_nacl64) | |
| 249 _CopyRuntime(out_debug, x86, "x86", debug=True) | 243 _CopyRuntime(out_debug, x86, "x86", debug=True) |
| 250 _CopyRuntime(out_release, x86, "x86", debug=False) | 244 _CopyRuntime(out_release, x86, "x86", debug=False) |
| 251 _CopyRuntime(out_debug_x64, x64, "x64", debug=True) | 245 _CopyRuntime(out_debug_x64, x64, "x64", debug=True) |
| 252 _CopyRuntime(out_release_x64, x64, "x64", debug=False) | 246 _CopyRuntime(out_release_x64, x64, "x64", debug=False) |
| 253 _CopyRuntime(out_debug_nacl64, x64, "x64", debug=True) | |
| 254 _CopyRuntime(out_release_nacl64, x64, "x64", debug=False) | |
| 255 | 247 |
| 256 | 248 |
| 257 def CopyDlls(target_dir, configuration, target_cpu): | 249 def CopyDlls(target_dir, configuration, target_cpu): |
| 258 """Copy the VS runtime DLLs into the requested directory as needed. | 250 """Copy the VS runtime DLLs into the requested directory as needed. |
| 259 | 251 |
| 260 configuration is one of 'Debug' or 'Release'. | 252 configuration is one of 'Debug' or 'Release'. |
| 261 target_cpu is one of 'x86' or 'x64'. | 253 target_cpu is one of 'x86' or 'x64'. |
| 262 | 254 |
| 263 The debug configuration gets both the debug and release DLLs; the | 255 The debug configuration gets both the debug and release DLLs; the |
| 264 release config only the latter. | 256 release config only the latter. |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 'copy_dlls': CopyDlls, | 362 'copy_dlls': CopyDlls, |
| 371 } | 363 } |
| 372 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 364 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 373 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 365 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 374 return 1 | 366 return 1 |
| 375 return commands[sys.argv[1]](*sys.argv[2:]) | 367 return commands[sys.argv[1]](*sys.argv[2:]) |
| 376 | 368 |
| 377 | 369 |
| 378 if __name__ == '__main__': | 370 if __name__ == '__main__': |
| 379 sys.exit(main()) | 371 sys.exit(main()) |
| OLD | NEW |