Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Side by Side Diff: native_client_sdk/src/build_tools/build_sdk.py

Issue 10356116: Add "libraries" directory to SDK (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/generators/idl_c_header.py » ('j') | ppapi/generators/idl_c_header.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 'glibc': { 235 'glibc': {
236 'nacl/dynamic_annotations.h': 236 'nacl/dynamic_annotations.h':
237 'src/untrusted/valgrind/dynamic_annotations.h', 237 'src/untrusted/valgrind/dynamic_annotations.h',
238 'nacl/nacl_dyncode.h': 'src/untrusted/nacl/nacl_dyncode.h', 238 'nacl/nacl_dyncode.h': 'src/untrusted/nacl/nacl_dyncode.h',
239 'nacl/nacl_startup.h': 'src/untrusted/nacl/nacl_startup.h', 239 'nacl/nacl_startup.h': 'src/untrusted/nacl/nacl_startup.h',
240 'nacl/nacl_thread.h': 'src/untrusted/nacl/nacl_thread.h', 240 'nacl/nacl_thread.h': 'src/untrusted/nacl/nacl_thread.h',
241 'pnacl.h': 'src/untrusted/nacl/pnacl.h', 241 'pnacl.h': 'src/untrusted/nacl/pnacl.h',
242 'irt.h': 'src/untrusted/irt/irt.h', 242 'irt.h': 'src/untrusted/irt/irt.h',
243 'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h', 243 'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h',
244 }, 244 },
245 'libs': {
246 },
245 } 247 }
246 248
247 249
248 def InstallHeaders(tc_dst_inc, pepper_ver, tc_name): 250 def InstallHeaders(tc_dst_inc, pepper_ver, tc_name):
249 """Copies NaCl headers to expected locations in the toolchain.""" 251 """Copies NaCl headers to expected locations in the toolchain."""
250 tc_map = HEADER_MAP[tc_name] 252 tc_map = HEADER_MAP[tc_name]
251 for filename in tc_map: 253 for filename in tc_map:
252 src = os.path.join(NACL_DIR, tc_map[filename]) 254 src = os.path.join(NACL_DIR, tc_map[filename])
253 dst = os.path.join(tc_dst_inc, filename) 255 dst = os.path.join(tc_dst_inc, filename)
254 buildbot_common.MakeDir(os.path.dirname(dst)) 256 buildbot_common.MakeDir(os.path.dirname(dst))
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 buildbot_common.BuildStep('Rerun hooks to get toolchains') 610 buildbot_common.BuildStep('Rerun hooks to get toolchains')
609 buildbot_common.Run(['gclient', 'runhooks'], 611 buildbot_common.Run(['gclient', 'runhooks'],
610 cwd=SRC_DIR, shell=(platform=='win')) 612 cwd=SRC_DIR, shell=(platform=='win'))
611 613
612 buildbot_common.BuildStep('Clean Pepper Dirs') 614 buildbot_common.BuildStep('Clean Pepper Dirs')
613 pepperdir = os.path.join(SRC_DIR, 'out', 'pepper_' + pepper_ver) 615 pepperdir = os.path.join(SRC_DIR, 'out', 'pepper_' + pepper_ver)
614 pepperold = os.path.join(SRC_DIR, 'out', 'pepper_' + pepper_old) 616 pepperold = os.path.join(SRC_DIR, 'out', 'pepper_' + pepper_old)
615 buildbot_common.RemoveDir(pepperold) 617 buildbot_common.RemoveDir(pepperold)
616 if not skip_untar: 618 if not skip_untar:
617 buildbot_common.RemoveDir(pepperdir) 619 buildbot_common.RemoveDir(pepperdir)
620 buildbot_common.MakeDir(os.path.join(pepperdir, 'libraries'))
618 buildbot_common.MakeDir(os.path.join(pepperdir, 'toolchain')) 621 buildbot_common.MakeDir(os.path.join(pepperdir, 'toolchain'))
619 buildbot_common.MakeDir(os.path.join(pepperdir, 'tools')) 622 buildbot_common.MakeDir(os.path.join(pepperdir, 'tools'))
620 else: 623 else:
621 buildbot_common.MakeDir(pepperdir) 624 buildbot_common.MakeDir(pepperdir)
622 625
623 if not skip_build: 626 if not skip_build:
624 buildbot_common.BuildStep('Add Text Files') 627 buildbot_common.BuildStep('Add Text Files')
625 files = ['AUTHORS', 'COPYING', 'LICENSE', 'NOTICE', 'README'] 628 files = ['AUTHORS', 'COPYING', 'LICENSE', 'NOTICE', 'README']
626 files = [os.path.join(SDK_SRC_DIR, filename) for filename in files] 629 files = [os.path.join(SDK_SRC_DIR, filename) for filename in files]
627 oshelpers.Copy(['-v'] + files + [pepperdir]) 630 oshelpers.Copy(['-v'] + files + [pepperdir])
628 631
629 632
630 # Clean out the temporary toolchain untar directory 633 # Clean out the temporary toolchain untar directory
631 if not skip_untar: 634 if not skip_untar:
632 UntarToolchains(pepperdir, platform, arch, toolchains) 635 UntarToolchains(pepperdir, platform, arch, toolchains)
633 636
634 if not skip_build: 637 if not skip_build:
635 BuildToolchains(pepperdir, platform, arch, pepper_ver, toolchains) 638 BuildToolchains(pepperdir, platform, arch, pepper_ver, toolchains)
639 InstallHeaders(os.path.join(pepperdir, 'libraries'), pepper_ver, 'libs')
636 640
637 if not skip_build: 641 if not skip_build:
638 buildbot_common.BuildStep('Copy make OS helpers') 642 buildbot_common.BuildStep('Copy make OS helpers')
639 buildbot_common.CopyDir(os.path.join(SDK_SRC_DIR, 'tools', '*.py'), 643 buildbot_common.CopyDir(os.path.join(SDK_SRC_DIR, 'tools', '*.py'),
640 os.path.join(pepperdir, 'tools')) 644 os.path.join(pepperdir, 'tools'))
641 if platform == 'win': 645 if platform == 'win':
642 buildbot_common.BuildStep('Add MAKE') 646 buildbot_common.BuildStep('Add MAKE')
643 http_download.HttpDownload(GSTORE + MAKE, 647 http_download.HttpDownload(GSTORE + MAKE,
644 os.path.join(pepperdir, 'tools' ,'make.exe')) 648 os.path.join(pepperdir, 'tools' ,'make.exe'))
645 rename_list = ['ncval_x86_32', 'ncval_x86_64', 649 rename_list = ['ncval_x86_32', 'ncval_x86_64',
(...skipping 15 matching lines...) Expand all
661 if not skip_tar: 665 if not skip_tar:
662 buildbot_common.BuildStep('Tar Pepper Bundle') 666 buildbot_common.BuildStep('Tar Pepper Bundle')
663 buildbot_common.Run([sys.executable, CYGTAR, '-C', OUT_DIR, '-cjf', tarfile, 667 buildbot_common.Run([sys.executable, CYGTAR, '-C', OUT_DIR, '-cjf', tarfile,
664 'pepper_' + pepper_ver], cwd=NACL_DIR) 668 'pepper_' + pepper_ver], cwd=NACL_DIR)
665 669
666 # build sdk update 670 # build sdk update
667 if not skip_update: 671 if not skip_update:
668 BuildUpdater() 672 BuildUpdater()
669 673
670 # start local server sharing a manifest + the new bundle 674 # start local server sharing a manifest + the new bundle
671 if not skip_test_updater: 675 if not skip_test_updater and not skip_tar:
672 buildbot_common.BuildStep('Move bundle to localserver dir') 676 buildbot_common.BuildStep('Move bundle to localserver dir')
673 buildbot_common.MakeDir(SERVER_DIR) 677 buildbot_common.MakeDir(SERVER_DIR)
674 buildbot_common.Move(tarfile, SERVER_DIR) 678 buildbot_common.Move(tarfile, SERVER_DIR)
675 tarfile = os.path.join(SERVER_DIR, tarname) 679 tarfile = os.path.join(SERVER_DIR, tarname)
676 680
677 server = None 681 server = None
678 try: 682 try:
679 buildbot_common.BuildStep('Run local server') 683 buildbot_common.BuildStep('Run local server')
680 server = LocalHTTPServer(SERVER_DIR) 684 server = LocalHTTPServer(SERVER_DIR)
681 685
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 manifest_snippet_stream.write(bundle.GetDataAsString()) 759 manifest_snippet_stream.write(bundle.GetDataAsString())
756 760
757 buildbot_common.Archive(tarname + '.json', bucket_path, OUT_DIR, 761 buildbot_common.Archive(tarname + '.json', bucket_path, OUT_DIR,
758 step_link=False) 762 step_link=False)
759 763
760 return 0 764 return 0
761 765
762 766
763 if __name__ == '__main__': 767 if __name__ == '__main__':
764 sys.exit(main(sys.argv)) 768 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | ppapi/generators/idl_c_header.py » ('j') | ppapi/generators/idl_c_header.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698