OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Enable 'with' statements in Python 2.5 | 6 # Enable 'with' statements in Python 2.5 |
7 from __future__ import with_statement | 7 from __future__ import with_statement |
8 | 8 |
9 import os.path | 9 import os.path |
10 import platform | 10 import platform |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 393 |
394 # On a subset of Linux builds, build Breakpad tools for testing. | 394 # On a subset of Linux builds, build Breakpad tools for testing. |
395 if context['use_breakpad_tools']: | 395 if context['use_breakpad_tools']: |
396 with Step('breakpad configure', status): | 396 with Step('breakpad configure', status): |
397 Command(context, cmd=['mkdir', '-p', 'breakpad-out']) | 397 Command(context, cmd=['mkdir', '-p', 'breakpad-out']) |
398 | 398 |
399 # Breakpad requires C++11, so use clang and the sysroot rather than | 399 # Breakpad requires C++11, so use clang and the sysroot rather than |
400 # hoping that the host toolchain will provide support. | 400 # hoping that the host toolchain will provide support. |
401 configure_args = [] | 401 configure_args = [] |
402 if context.Linux(): | 402 if context.Linux(): |
403 cxx = 'CXX=../../third_party/llvm-build/Release+Asserts/bin/clang++ ' | 403 cc = 'CC=../../third_party/llvm-build/Release+Asserts/bin/clang' |
| 404 cxx = 'CXX=../../third_party/llvm-build/Release+Asserts/bin/clang++' |
| 405 flags = '' |
404 if context['arch'] == '32': | 406 if context['arch'] == '32': |
405 cxx += '-m32' | 407 flags += ' -m32' |
406 sysroot_arch = 'i386' | 408 sysroot_arch = 'i386' |
407 else: | 409 else: |
408 cxx += '-m64' | 410 flags += ' -m64' |
409 sysroot_arch = 'amd64' | 411 sysroot_arch = 'amd64' |
410 cxx += (' --sysroot=../../build/linux/debian_wheezy_%s-sysroot' % | 412 flags += (' --sysroot=../../build/linux/debian_wheezy_%s-sysroot' % |
411 sysroot_arch) | 413 sysroot_arch) |
412 configure_args += [cxx] | 414 configure_args += [cc + flags, cxx + flags] |
413 configure_args += ['CXXFLAGS=-I../..'] # For third_party/lss | 415 configure_args += ['CXXFLAGS=-I../..'] # For third_party/lss |
414 Command(context, cwd='breakpad-out', | 416 Command(context, cwd='breakpad-out', |
415 cmd=['bash', '../../breakpad/configure'] + configure_args) | 417 cmd=['bash', '../../breakpad/configure'] + configure_args) |
416 | 418 |
417 with Step('breakpad make', status): | 419 with Step('breakpad make', status): |
418 Command(context, cmd=['make', '-j%d' % context['max_jobs'], | 420 Command(context, cmd=['make', '-j%d' % context['max_jobs'], |
419 # This avoids a broken dependency on | 421 # This avoids a broken dependency on |
420 # src/third_party/lss files within the breakpad | 422 # src/third_party/lss files within the breakpad |
421 # source directory. We are not putting lss | 423 # source directory. We are not putting lss |
422 # there, but using the -I switch above to | 424 # there, but using the -I switch above to |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 start_time = time.time() | 500 start_time = time.time() |
499 try: | 501 try: |
500 Main() | 502 Main() |
501 finally: | 503 finally: |
502 time_taken = time.time() - start_time | 504 time_taken = time.time() - start_time |
503 print 'RESULT BuildbotTime: total= %.3f minutes' % (time_taken / 60) | 505 print 'RESULT BuildbotTime: total= %.3f minutes' % (time_taken / 60) |
504 | 506 |
505 | 507 |
506 if __name__ == '__main__': | 508 if __name__ == '__main__': |
507 TimedMain() | 509 TimedMain() |
OLD | NEW |