Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """Script to build binary components of the SDK. | 6 """Script to build binary components of the SDK. |
| 7 | 7 |
| 8 This script builds binary components of the Native Client SDK, create tarballs | 8 This script builds binary components of the Native Client SDK, create tarballs |
| 9 for them, and uploads them to Google Cloud Storage. | 9 for them, and uploads them to Google Cloud Storage. |
| 10 | 10 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 351 else: | 351 else: |
| 352 toolchain = tcname | 352 toolchain = tcname |
| 353 | 353 |
| 354 tcpath = os.path.join(root, 'Release', 'gen', 'sdk', '%s_x86' % PLATFORM, | 354 tcpath = os.path.join(root, 'Release', 'gen', 'sdk', '%s_x86' % PLATFORM, |
| 355 TOOLCHAIN_PACKAGE_MAP[toolchain]) | 355 TOOLCHAIN_PACKAGE_MAP[toolchain]) |
| 356 return GetToolchainNaClLib(tcname, tcpath, xarch) | 356 return GetToolchainNaClLib(tcname, tcpath, xarch) |
| 357 | 357 |
| 358 | 358 |
| 359 def MakeGypArchives(): | 359 def MakeGypArchives(): |
| 360 join = os.path.join | 360 join = os.path.join |
| 361 gyp_nacl = join(NACL_DIR, 'build', 'gyp_nacl') | |
| 362 gyp_chromium = join(SRC_DIR, 'build', 'gyp_chromium') | 361 gyp_chromium = join(SRC_DIR, 'build', 'gyp_chromium') |
| 362 # TODO(binji): gyp_nacl doesn't build properly on Windows anymore; it only | |
| 363 # can use VS2010, not VS2013 which is now required by the Chromium repo. NaCl | |
| 364 # needs to be updated to perform the same logic as Chromium in detecting VS, | |
| 365 # which can now exist in the depot_tools directory. | |
| 366 # See https://code.google.com/p/nativeclient/issues/detail?id=4022 | |
| 367 # | |
| 368 # For now, let's use gyp_chromium to build these components. | |
| 369 # gyp_nacl = join(NACL_DIR, 'build', 'gyp_nacl') | |
|
bradn
2014/12/15 23:10:06
leave this in?
| |
| 370 gyp_nacl = gyp_chromium | |
|
Sam Clegg
2014/12/15 23:17:41
Does this slow down the build at all?
binji
2014/12/16 01:08:32
Doesn't seem to.
| |
| 371 | |
| 363 nacl_core_sdk_gyp = join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') | 372 nacl_core_sdk_gyp = join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') |
| 364 all_gyp = join(NACL_DIR, 'build', 'all.gyp') | 373 all_gyp = join(NACL_DIR, 'build', 'all.gyp') |
| 365 breakpad_gyp = join(SRC_DIR, 'breakpad', 'breakpad.gyp') | 374 breakpad_gyp = join(SRC_DIR, 'breakpad', 'breakpad.gyp') |
| 366 ppapi_gyp = join(SRC_DIR, 'ppapi', 'native_client', 'native_client.gyp') | 375 ppapi_gyp = join(SRC_DIR, 'ppapi', 'native_client', 'native_client.gyp') |
| 367 breakpad_targets = ['dump_syms', 'minidump_dump', 'minidump_stackwalk'] | 376 breakpad_targets = ['dump_syms', 'minidump_dump', 'minidump_stackwalk'] |
| 368 | 377 |
| 369 # Build | 378 # Build |
| 370 tmpdir_obj = TempDir('nacl_core_sdk_', dont_remove=True).Create() | 379 tmpdir_obj = TempDir('nacl_core_sdk_', dont_remove=True).Create() |
| 371 tmpdir = tmpdir_obj.name | 380 tmpdir = tmpdir_obj.name |
| 372 GypNinjaBuild('ia32', gyp_nacl, nacl_core_sdk_gyp, 'nacl_core_sdk', tmpdir) | 381 GypNinjaBuild('ia32', gyp_nacl, nacl_core_sdk_gyp, 'nacl_core_sdk', tmpdir) |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 578 if options.upload: | 587 if options.upload: |
| 579 UploadArchives() | 588 UploadArchives() |
| 580 | 589 |
| 581 return 0 | 590 return 0 |
| 582 | 591 |
| 583 if __name__ == '__main__': | 592 if __name__ == '__main__': |
| 584 try: | 593 try: |
| 585 sys.exit(main(sys.argv[1:])) | 594 sys.exit(main(sys.argv[1:])) |
| 586 except KeyboardInterrupt: | 595 except KeyboardInterrupt: |
| 587 buildbot_common.ErrorExit('build_artifacts: interrupted') | 596 buildbot_common.ErrorExit('build_artifacts: interrupted') |
| OLD | NEW |