| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 "find /var/folders -name '.com.google.Chrome*' -exec rm -rfv '{}' ';'"
, | 327 "find /var/folders -name '.com.google.Chrome*' -exec rm -rfv '{}' ';'"
, |
| 328 shell=True) | 328 shell=True) |
| 329 | 329 |
| 330 # Skip over hooks when run inside the toolchain build because | 330 # Skip over hooks when run inside the toolchain build because |
| 331 # package_version would overwrite the toolchain build. | 331 # package_version would overwrite the toolchain build. |
| 332 if not inside_toolchain: | 332 if not inside_toolchain: |
| 333 with Step('gclient_runhooks', status): | 333 with Step('gclient_runhooks', status): |
| 334 CommandGclientRunhooks(context) | 334 CommandGclientRunhooks(context) |
| 335 | 335 |
| 336 # Always update Clang. On Linux and Mac, it's the default for the GN build. | 336 # Always update Clang. On Linux and Mac, it's the default for the GN build. |
| 337 # On Windows, we do a second Clang GN build. | 337 # It's also used for the Linux Breakpad build. On Windows, we do a second |
| 338 # Clang GN build. |
| 338 with Step('update_clang', status): | 339 with Step('update_clang', status): |
| 339 Command(context, cmd=[sys.executable, '../tools/clang/scripts/update.py']) | 340 Command(context, cmd=[sys.executable, '../tools/clang/scripts/update.py']) |
| 340 | 341 |
| 341 # Make sure our GN build is working. | 342 # Make sure our GN build is working. |
| 342 using_gn = DoGNBuild(status, context) | 343 using_gn = DoGNBuild(status, context) |
| 343 using_gn_clang = False | 344 using_gn_clang = False |
| 344 if (context.Windows() and | 345 if (context.Windows() and |
| 345 not context['clang'] and | 346 not context['clang'] and |
| 346 context['arch'] in ('32', '64')): | 347 context['arch'] in ('32', '64')): |
| 347 # On Windows, do a second GN build with is_clang=true. | 348 # On Windows, do a second GN build with is_clang=true. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 return | 388 return |
| 388 | 389 |
| 389 # Run checkdeps script to vet #includes. | 390 # Run checkdeps script to vet #includes. |
| 390 with Step('checkdeps', status): | 391 with Step('checkdeps', status): |
| 391 Command(context, cmd=[sys.executable, 'tools/checkdeps/checkdeps.py']) | 392 Command(context, cmd=[sys.executable, 'tools/checkdeps/checkdeps.py']) |
| 392 | 393 |
| 393 # On a subset of Linux builds, build Breakpad tools for testing. | 394 # On a subset of Linux builds, build Breakpad tools for testing. |
| 394 if context['use_breakpad_tools']: | 395 if context['use_breakpad_tools']: |
| 395 with Step('breakpad configure', status): | 396 with Step('breakpad configure', status): |
| 396 Command(context, cmd=['mkdir', '-p', 'breakpad-out']) | 397 Command(context, cmd=['mkdir', '-p', 'breakpad-out']) |
| 398 |
| 399 # Breakpad requires C++11, so use clang and the sysroot rather than |
| 400 # hoping that the host toolchain will provide support. |
| 401 configure_args = [] |
| 402 if context.Linux(): |
| 403 cxx = 'CXX=../../third_party/llvm-build/Release+Asserts/bin/clang++ ' |
| 404 if context['arch'] == '32': |
| 405 cxx += '-m32' |
| 406 sysroot_arch = 'i386' |
| 407 else: |
| 408 cxx += '-m64' |
| 409 sysroot_arch = 'amd64' |
| 410 cxx += (' --sysroot=../../build/linux/debian_wheezy_%s-sysroot' % |
| 411 sysroot_arch) |
| 412 configure_args += [cxx] |
| 413 configure_args += ['CXXFLAGS=-I../..'] # For third_party/lss |
| 397 Command(context, cwd='breakpad-out', | 414 Command(context, cwd='breakpad-out', |
| 398 cmd=['bash', '../../breakpad/configure', | 415 cmd=['bash', '../../breakpad/configure'] + configure_args) |
| 399 'CXXFLAGS=-I../..']) # For third_party/lss | 416 |
| 400 with Step('breakpad make', status): | 417 with Step('breakpad make', status): |
| 401 Command(context, cmd=['make', '-j%d' % context['max_jobs'], | 418 Command(context, cmd=['make', '-j%d' % context['max_jobs'], |
| 402 # This avoids a broken dependency on | 419 # This avoids a broken dependency on |
| 403 # src/third_party/lss files within the breakpad | 420 # src/third_party/lss files within the breakpad |
| 404 # source directory. We are not putting lss | 421 # source directory. We are not putting lss |
| 405 # there, but using the -I switch above to | 422 # there, but using the -I switch above to |
| 406 # find the lss in ../third_party instead. | 423 # find the lss in ../third_party instead. |
| 407 'includelss_HEADERS=', | 424 'includelss_HEADERS=', |
| 408 ], | 425 ], |
| 409 cwd='breakpad-out') | 426 cwd='breakpad-out') |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 start_time = time.time() | 498 start_time = time.time() |
| 482 try: | 499 try: |
| 483 Main() | 500 Main() |
| 484 finally: | 501 finally: |
| 485 time_taken = time.time() - start_time | 502 time_taken = time.time() - start_time |
| 486 print 'RESULT BuildbotTime: total= %.3f minutes' % (time_taken / 60) | 503 print 'RESULT BuildbotTime: total= %.3f minutes' % (time_taken / 60) |
| 487 | 504 |
| 488 | 505 |
| 489 if __name__ == '__main__': | 506 if __name__ == '__main__': |
| 490 TimedMain() | 507 TimedMain() |
| OLD | NEW |