OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 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 # This script is wrapper for Chromium that adds some support for how GYP | 7 # This script is wrapper for Chromium that adds some support for how GYP |
8 # is invoked by Chromium beyond what can be done in the gclient hooks. | 8 # is invoked by Chromium beyond what can be done in the gclient hooks. |
9 | 9 |
10 import glob | 10 import glob |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 if (os.path.isdir(target_dir) and | 362 if (os.path.isdir(target_dir) and |
363 (not os.path.isfile(target) or | 363 (not os.path.isfile(target) or |
364 os.stat(target).st_mtime != os.stat(source).st_mtime)): | 364 os.stat(target).st_mtime != os.stat(source).st_mtime)): |
365 print 'Copying %s to %s...' % (source, target) | 365 print 'Copying %s to %s...' % (source, target) |
366 if os.path.exists(target): | 366 if os.path.exists(target): |
367 os.unlink(target) | 367 os.unlink(target) |
368 shutil.copy2(source, target) | 368 shutil.copy2(source, target) |
369 | 369 |
370 x86, x64 = runtime_dirs | 370 x86, x64 = runtime_dirs |
371 out_debug = os.path.join(output_dir, 'Debug') | 371 out_debug = os.path.join(output_dir, 'Debug') |
| 372 out_debug_nacl64 = os.path.join(output_dir, 'Debug', 'x64') |
372 out_release = os.path.join(output_dir, 'Release') | 373 out_release = os.path.join(output_dir, 'Release') |
| 374 out_release_nacl64 = os.path.join(output_dir, 'Release', 'x64') |
373 out_debug_x64 = os.path.join(output_dir, 'Debug_x64') | 375 out_debug_x64 = os.path.join(output_dir, 'Debug_x64') |
374 out_release_x64 = os.path.join(output_dir, 'Release_x64') | 376 out_release_x64 = os.path.join(output_dir, 'Release_x64') |
375 copy_runtime(out_debug, x86, 'msvc%s120d.dll') | 377 |
376 copy_runtime(out_release, x86, 'msvc%s120.dll') | 378 if os.path.exists(out_debug) and not os.path.exists(out_debug_nacl64): |
377 copy_runtime(out_debug_x64, x64, 'msvc%s120d.dll') | 379 os.makedirs(out_debug_nacl64) |
378 copy_runtime(out_release_x64, x64, 'msvc%s120.dll') | 380 if os.path.exists(out_release) and not os.path.exists(out_release_nacl64): |
| 381 os.makedirs(out_release_nacl64) |
| 382 copy_runtime(out_debug, x86, 'msvc%s120d.dll') |
| 383 copy_runtime(out_release, x86, 'msvc%s120.dll') |
| 384 copy_runtime(out_debug_x64, x64, 'msvc%s120d.dll') |
| 385 copy_runtime(out_release_x64, x64, 'msvc%s120.dll') |
| 386 copy_runtime(out_debug_nacl64, x64, 'msvc%s120d.dll') |
| 387 copy_runtime(out_release_nacl64, x64, 'msvc%s120.dll') |
379 | 388 |
380 | 389 |
381 if __name__ == '__main__': | 390 if __name__ == '__main__': |
382 args = sys.argv[1:] | 391 args = sys.argv[1:] |
383 | 392 |
384 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): | 393 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): |
385 print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' | 394 print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' |
386 sys.exit(0) | 395 sys.exit(0) |
387 | 396 |
388 # Use the Psyco JIT if available. | 397 # Use the Psyco JIT if available. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 print 'Running build/landmines.py...' | 550 print 'Running build/landmines.py...' |
542 subprocess.check_call( | 551 subprocess.check_call( |
543 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 552 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
544 | 553 |
545 if vs2013_runtime_dll_dirs: | 554 if vs2013_runtime_dll_dirs: |
546 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 555 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
547 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), | 556 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), |
548 (x86_runtime, x64_runtime)) | 557 (x86_runtime, x64_runtime)) |
549 | 558 |
550 sys.exit(gyp_rc) | 559 sys.exit(gyp_rc) |
OLD | NEW |