OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium 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 """Entry point for both build and try bots. | 6 """Entry point for both build and try bots. |
7 | 7 |
8 This script is invoked from XXX, usually without arguments | 8 This script is invoked from XXX, usually without arguments |
9 to package an SDK. It automatically determines whether | 9 to package an SDK. It automatically determines whether |
10 this SDK is for mac, win, linux. | 10 this SDK is for mac, win, linux. |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 tools_dir = os.path.join(pepperdir, 'tools') | 363 tools_dir = os.path.join(pepperdir, 'tools') |
364 buildbot_common.MakeDir(tools_dir) | 364 buildbot_common.MakeDir(tools_dir) |
365 | 365 |
366 # Add .exe extensions to all windows tools | 366 # Add .exe extensions to all windows tools |
367 for pair in tools_files_x86 + tools_files_x64: | 367 for pair in tools_files_x86 + tools_files_x64: |
368 if platform == 'win' and not os.path.splitext(pair[0])[1]: | 368 if platform == 'win' and not os.path.splitext(pair[0])[1]: |
369 pair[0] += '.exe' | 369 pair[0] += '.exe' |
370 pair[1] += '.exe' | 370 pair[1] += '.exe' |
371 | 371 |
372 InstallFiles(GetNinjaOutDir('x64'), tools_dir, tools_files_x64) | 372 InstallFiles(GetNinjaOutDir('x64'), tools_dir, tools_files_x64) |
373 if platform != 'mac' and platform != 'linux': | 373 if platform != 'mac': |
374 InstallFiles(GetNinjaOutDir('x86'), tools_dir, tools_files_x86) | 374 InstallFiles(GetNinjaOutDir('x86'), tools_dir, tools_files_x86) |
375 if platform == 'linux': | 375 if platform == 'linux': |
376 InstallFiles(GetNinjaOutDir('arm'), tools_dir, tools_files_arm) | 376 InstallFiles(GetNinjaOutDir('arm'), tools_dir, tools_files_arm) |
377 | 377 |
378 stub_dir = os.path.join(SRC_DIR, 'ppapi/native_client/src/untrusted/irt_stub') | 378 stub_dir = os.path.join(SRC_DIR, 'ppapi/native_client/src/untrusted/irt_stub') |
379 for tc in toolchains: | 379 for tc in toolchains: |
380 if tc in ('host', 'clang-newlib'): | 380 if tc in ('host', 'clang-newlib'): |
381 continue | 381 continue |
382 elif tc == 'pnacl': | 382 elif tc == 'pnacl': |
383 xarches = ('pnacl', 'x86', 'x64', 'arm') | 383 xarches = ('pnacl', 'x86', 'x64', 'arm') |
(...skipping 16 matching lines...) Expand all Loading... |
400 | 400 |
401 | 401 |
402 def GnNinjaBuildAll(rel_out_dir): | 402 def GnNinjaBuildAll(rel_out_dir): |
403 def MakeNinjaRelPath(suffix): | 403 def MakeNinjaRelPath(suffix): |
404 return os.path.join(os.path.relpath(OUT_DIR, SRC_DIR), rel_out_dir + suffix) | 404 return os.path.join(os.path.relpath(OUT_DIR, SRC_DIR), rel_out_dir + suffix) |
405 | 405 |
406 platform = getos.GetPlatform() | 406 platform = getos.GetPlatform() |
407 | 407 |
408 GnNinjaBuild('x64', MakeNinjaRelPath('-x64'), | 408 GnNinjaBuild('x64', MakeNinjaRelPath('-x64'), |
409 ['nacl_sdk_untrusted=true']) | 409 ['nacl_sdk_untrusted=true']) |
410 if platform != 'mac' and platform != 'linux': | 410 if platform != 'mac': |
411 GnNinjaBuild('x86', MakeNinjaRelPath('-x86')) | 411 GnNinjaBuild('x86', MakeNinjaRelPath('-x86')) |
412 | 412 |
413 if platform == 'linux': | 413 if platform == 'linux': |
414 GnNinjaBuild('arm', MakeNinjaRelPath('-arm')) | 414 GnNinjaBuild('arm', MakeNinjaRelPath('-arm')) |
415 | 415 |
416 | 416 |
417 def GetGNExecutable(platform): | 417 def GetGNExecutable(platform): |
418 # TODO(sbc): Remove this code, which is duplicated from mb.py and simply | 418 # TODO(sbc): Remove this code, which is duplicated from mb.py and simply |
419 # rely on the depot_tools gn wrapper which should be in the PATH. | 419 # rely on the depot_tools gn wrapper which should be in the PATH. |
420 # http://crbug.com/588794 | 420 # http://crbug.com/588794 |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 BuildStepArchivePNaClComponent(chrome_revision) | 873 BuildStepArchivePNaClComponent(chrome_revision) |
874 | 874 |
875 return 0 | 875 return 0 |
876 | 876 |
877 | 877 |
878 if __name__ == '__main__': | 878 if __name__ == '__main__': |
879 try: | 879 try: |
880 sys.exit(main(sys.argv[1:])) | 880 sys.exit(main(sys.argv[1:])) |
881 except KeyboardInterrupt: | 881 except KeyboardInterrupt: |
882 buildbot_common.ErrorExit('build_sdk: interrupted') | 882 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |